@@ -1375,7 +1375,7 @@ namespace ServiceStack
13751375{
13761376 public static class MimeTypes
13771377 {
1378- public static Dictionary < string , string > ExtensionMimeTypes = new Dictionary < string , string > ( ) ;
1378+ public static Dictionary < string , string > ExtensionMimeTypes = new ( ) ;
13791379 public const string Utf8Suffix = "; charset=utf-8" ;
13801380
13811381 public const string Html = "text/html" ;
@@ -1957,7 +1957,7 @@ public static class HttpHeaders
19571957 public const string Host = "Host" ;
19581958 public const string UserAgent = "User-Agent" ;
19591959
1960- public static HashSet < string > RestrictedHeaders = new HashSet < string > ( StringComparer . OrdinalIgnoreCase )
1960+ public static HashSet < string > RestrictedHeaders = new ( StringComparer . OrdinalIgnoreCase )
19611961 {
19621962 Accept ,
19631963 Connection ,
@@ -1990,7 +1990,7 @@ public static class HttpMethods
19901990 "POLL" , "SUBSCRIBE" , "UNSUBSCRIBE" //MS Exchange WebDav: http://msdn.microsoft.com/en-us/library/aa142917.aspx
19911991 } ;
19921992
1993- public static HashSet < string > AllVerbs = new HashSet < string > ( allVerbs ) ;
1993+ public static HashSet < string > AllVerbs = new ( allVerbs ) ;
19941994
19951995 public static bool Exists ( string httpMethod ) => AllVerbs . Contains ( httpMethod . ToUpper ( ) ) ;
19961996 public static bool HasVerb ( string httpVerb ) => Exists ( httpVerb ) ;
@@ -2034,7 +2034,7 @@ public static void AssertIsValid(string compressionType)
20342034 if ( ! IsValid ( compressionType ) )
20352035 {
20362036 throw new NotSupportedException ( compressionType
2037- + " is not a supported compression type. Valid types: gzip, deflate, br." ) ;
2037+ + " is not a supported compression type. Valid types: " + string . Join ( ", " , AllCompressionTypes ) ) ;
20382038 }
20392039 }
20402040
@@ -2057,7 +2057,7 @@ public static class HttpStatus
20572057 {
20582058 public static string GetStatusDescription ( int statusCode )
20592059 {
2060- if ( statusCode >= 100 && statusCode < 600 )
2060+ if ( statusCode is >= 100 and < 600 )
20612061 {
20622062 int i = statusCode / 100 ;
20632063 int j = statusCode % 100 ;
@@ -2069,7 +2069,7 @@ public static string GetStatusDescription(int statusCode)
20692069 return string . Empty ;
20702070 }
20712071
2072- private static readonly string [ ] [ ] Descriptions = new string [ ] [ ]
2072+ private static readonly string [ ] [ ] Descriptions =
20732073 {
20742074 null ,
20752075 new [ ]
0 commit comments