File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
AspNetCore/WebApi/src/Asp.Versioning.Http
AspNet/WebApi/src/Asp.Versioning.WebApi Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 44namespace Asp . Versioning ;
55
66using Newtonsoft . Json ;
7- using System . Web . Http ;
87using static Asp . Versioning . ProblemDetailsDefaults ;
98using static Newtonsoft . Json . NullValueHandling ;
109using static System . Globalization . CultureInfo ;
Original file line number Diff line number Diff line change @@ -51,24 +51,24 @@ public ProblemDetails CreateProblemDetails(
5151 /// <exception cref="ArgumentNullException"><paramref name="problemDetails"/> is <c>null</c>.</exception>
5252 public static void ApplyExtensions ( ProblemDetails problemDetails )
5353 {
54- const string Code = nameof ( Code ) ;
54+ const string code = nameof ( code ) ;
5555 var type = ( problemDetails ?? throw new ArgumentNullException ( nameof ( problemDetails ) ) ) . Type ;
5656
5757 if ( type == Ambiguous . Type )
5858 {
59- problemDetails . Extensions [ Code ] = Ambiguous . Code ;
59+ problemDetails . Extensions [ code ] = Ambiguous . Code ;
6060 }
6161 else if ( type == Invalid . Type )
6262 {
63- problemDetails . Extensions [ Code ] = Invalid . Code ;
63+ problemDetails . Extensions [ code ] = Invalid . Code ;
6464 }
6565 else if ( type == Unspecified . Type )
6666 {
67- problemDetails . Extensions [ Code ] = Unspecified . Code ;
67+ problemDetails . Extensions [ code ] = Unspecified . Code ;
6868 }
6969 else if ( type == Unsupported . Type )
7070 {
71- problemDetails . Extensions [ Code ] = Unsupported . Code ;
71+ problemDetails . Extensions [ code ] = Unsupported . Code ;
7272 }
7373 }
7474}
You can’t perform that action at this time.
0 commit comments