File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ public void AddHandler(string contentType, IDeserializer deserializer)
201
201
{
202
202
this . ContentHandlers [ contentType ] = deserializer ;
203
203
204
- if ( contentType != "*" && ! this . structuredSyntaxSuffixWildcardRegex . IsMatch ( contentType ) )
204
+ if ( contentType != "*" && ! structuredSyntaxSuffixWildcardRegex . IsMatch ( contentType ) )
205
205
{
206
206
this . AcceptTypes . Add ( contentType ) ;
207
207
// add Accept header based on registered deserializers
@@ -268,7 +268,7 @@ private IDeserializer GetHandler(string contentType)
268
268
}
269
269
270
270
// https://tools.ietf.org/html/rfc6839#page-4
271
- Match structuredSyntaxSuffixMatch = this . structuredSyntaxSuffixRegex . Match ( contentType ) ;
271
+ Match structuredSyntaxSuffixMatch = structuredSyntaxSuffixRegex . Match ( contentType ) ;
272
272
273
273
if ( structuredSyntaxSuffixMatch . Success )
274
274
{
@@ -293,9 +293,9 @@ private IDeserializer GetHandler(string contentType)
293
293
294
294
private readonly Regex structuredSyntaxSuffixWildcardRegex = new Regex ( @"^\*\+\w+$" ) ;
295
295
#else
296
- private readonly Regex structuredSyntaxSuffixRegex = new Regex ( @"\+\w+$" , RegexOptions . Compiled ) ;
296
+ private static readonly Regex structuredSyntaxSuffixRegex = new Regex ( @"\+\w+$" , RegexOptions . Compiled ) ;
297
297
298
- private readonly Regex structuredSyntaxSuffixWildcardRegex = new Regex ( @"^\*\+\w+$" , RegexOptions . Compiled ) ;
298
+ private static readonly Regex structuredSyntaxSuffixWildcardRegex = new Regex ( @"^\*\+\w+$" , RegexOptions . Compiled ) ;
299
299
#endif
300
300
301
301
private void AuthenticateIfNeeded ( RestClient client , IRestRequest request )
You can’t perform that action at this time.
0 commit comments