Make some ThrowHelpers static (#5951)
This commit is contained in:
parent
7371d90222
commit
5a64688d8e
|
|
@ -77,22 +77,22 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ThrowHeadersReadOnlyException()
|
protected static void ThrowHeadersReadOnlyException()
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException(CoreStrings.HeadersAreReadOnly);
|
throw new InvalidOperationException(CoreStrings.HeadersAreReadOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ThrowArgumentException()
|
protected static void ThrowArgumentException()
|
||||||
{
|
{
|
||||||
throw new ArgumentException();
|
throw new ArgumentException();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ThrowKeyNotFoundException()
|
protected static void ThrowKeyNotFoundException()
|
||||||
{
|
{
|
||||||
throw new KeyNotFoundException();
|
throw new KeyNotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ThrowDuplicateKeyException()
|
protected static void ThrowDuplicateKeyException()
|
||||||
{
|
{
|
||||||
throw new ArgumentException(CoreStrings.KeyAlreadyExists);
|
throw new ArgumentException(CoreStrings.KeyAlreadyExists);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1204,7 +1204,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
|
||||||
statusCode != StatusCodes.Status304NotModified;
|
statusCode != StatusCodes.Status304NotModified;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ThrowResponseAlreadyStartedException(string value)
|
private static void ThrowResponseAlreadyStartedException(string value)
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException(CoreStrings.FormatParameterReadOnlyAfterResponseStarted(value));
|
throw new InvalidOperationException(CoreStrings.FormatParameterReadOnlyAfterResponseStarted(value));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue