Make some ThrowHelpers static (#5951)

This commit is contained in:
Ben Adams 2018-12-25 00:53:07 +00:00 committed by Pavel Krymets
parent 7371d90222
commit 5a64688d8e
2 changed files with 5 additions and 5 deletions

View File

@ -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);
} }

View File

@ -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));
} }