22// The .NET Foundation licenses this file to you under the MIT license.
33
44using System . Diagnostics . CodeAnalysis ;
5+ using System . Runtime . CompilerServices ;
56using Microsoft . AspNetCore . Http ;
67using Microsoft . AspNetCore . Routing ;
78using Microsoft . AspNetCore . Routing . Patterns ;
@@ -227,6 +228,7 @@ static RequestDelegateResult CreateHandlerRequestDelegate(Delegate handler, Requ
227228 /// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
228229 [ RequiresUnreferencedCode ( MapEndpointUnreferencedCodeWarning ) ]
229230 [ RequiresDynamicCode ( MapEndpointDynamicCodeWarning ) ]
231+ [ OverloadResolutionPriority ( 1 ) ]
230232 public static RouteHandlerBuilder MapGet (
231233 this IEndpointRouteBuilder endpoints ,
232234 [ StringSyntax ( "Route" ) ] string pattern ,
@@ -245,6 +247,7 @@ public static RouteHandlerBuilder MapGet(
245247 /// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
246248 [ RequiresUnreferencedCode ( MapEndpointUnreferencedCodeWarning ) ]
247249 [ RequiresDynamicCode ( MapEndpointDynamicCodeWarning ) ]
250+ [ OverloadResolutionPriority ( 1 ) ]
248251 public static RouteHandlerBuilder MapPost (
249252 this IEndpointRouteBuilder endpoints ,
250253 [ StringSyntax ( "Route" ) ] string pattern ,
@@ -263,6 +266,7 @@ public static RouteHandlerBuilder MapPost(
263266 /// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
264267 [ RequiresUnreferencedCode ( MapEndpointUnreferencedCodeWarning ) ]
265268 [ RequiresDynamicCode ( MapEndpointDynamicCodeWarning ) ]
269+ [ OverloadResolutionPriority ( 1 ) ]
266270 public static RouteHandlerBuilder MapPut (
267271 this IEndpointRouteBuilder endpoints ,
268272 [ StringSyntax ( "Route" ) ] string pattern ,
@@ -281,6 +285,7 @@ public static RouteHandlerBuilder MapPut(
281285 /// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
282286 [ RequiresUnreferencedCode ( MapEndpointUnreferencedCodeWarning ) ]
283287 [ RequiresDynamicCode ( MapEndpointDynamicCodeWarning ) ]
288+ [ OverloadResolutionPriority ( 1 ) ]
284289 public static RouteHandlerBuilder MapDelete (
285290 this IEndpointRouteBuilder endpoints ,
286291 [ StringSyntax ( "Route" ) ] string pattern ,
@@ -299,6 +304,7 @@ public static RouteHandlerBuilder MapDelete(
299304 /// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
300305 [ RequiresUnreferencedCode ( MapEndpointUnreferencedCodeWarning ) ]
301306 [ RequiresDynamicCode ( MapEndpointDynamicCodeWarning ) ]
307+ [ OverloadResolutionPriority ( 1 ) ]
302308 public static RouteHandlerBuilder MapPatch (
303309 this IEndpointRouteBuilder endpoints ,
304310 [ StringSyntax ( "Route" ) ] string pattern ,
@@ -338,6 +344,7 @@ public static RouteHandlerBuilder MapMethods(
338344 /// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the endpoint.</returns>
339345 [ RequiresUnreferencedCode ( MapEndpointUnreferencedCodeWarning ) ]
340346 [ RequiresDynamicCode ( MapEndpointDynamicCodeWarning ) ]
347+ [ OverloadResolutionPriority ( 1 ) ]
341348 public static RouteHandlerBuilder Map (
342349 this IEndpointRouteBuilder endpoints ,
343350 [ StringSyntax ( "Route" ) ] string pattern ,
@@ -413,6 +420,7 @@ public static RouteHandlerBuilder MapFallback(this IEndpointRouteBuilder endpoin
413420 /// </remarks>
414421 [ RequiresUnreferencedCode ( MapEndpointUnreferencedCodeWarning ) ]
415422 [ RequiresDynamicCode ( MapEndpointDynamicCodeWarning ) ]
423+ [ OverloadResolutionPriority ( 1 ) ]
416424 public static RouteHandlerBuilder MapFallback (
417425 this IEndpointRouteBuilder endpoints ,
418426 [ StringSyntax ( "Route" ) ] string pattern ,
0 commit comments