Delen via


EndpointRouteBuilderExtensions.MapMethods Method

Definition

Overloads

MapMethods(IEndpointRouteBuilder, String, IEnumerable<String>, RequestDelegate)

Adds a RouteEndpoint to the IEndpointRouteBuilder that matches HTTP requests for the specified HTTP methods and pattern.

MapMethods(IEndpointRouteBuilder, String, IEnumerable<String>, Delegate)

Adds a RouteEndpoint to the IEndpointRouteBuilder that matches HTTP requests for the specified HTTP methods and pattern.

MapMethods(IEndpointRouteBuilder, String, IEnumerable<String>, RequestDelegate)

Source:
EndpointRouteBuilderExtensions.cs

Adds a RouteEndpoint to the IEndpointRouteBuilder that matches HTTP requests for the specified HTTP methods and pattern.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IEndpointConventionBuilder ^ MapMethods(Microsoft::AspNetCore::Routing::IEndpointRouteBuilder ^ endpoints, System::String ^ pattern, System::Collections::Generic::IEnumerable<System::String ^> ^ httpMethods, Microsoft::AspNetCore::Http::RequestDelegate ^ requestDelegate);
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapMethods (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, System.Collections.Generic.IEnumerable<string> httpMethods, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate);
static member MapMethods : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * seq<string> * Microsoft.AspNetCore.Http.RequestDelegate -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function MapMethods (endpoints As IEndpointRouteBuilder, pattern As String, httpMethods As IEnumerable(Of String), requestDelegate As RequestDelegate) As IEndpointConventionBuilder

Parameters

endpoints
IEndpointRouteBuilder

The IEndpointRouteBuilder to add the route to.

pattern
String

The route pattern.

httpMethods
IEnumerable<String>

HTTP methods that the endpoint will match.

requestDelegate
RequestDelegate

The delegate executed when the endpoint is matched.

Returns

A IEndpointConventionBuilder that can be used to further customize the endpoint.

Applies to

MapMethods(IEndpointRouteBuilder, String, IEnumerable<String>, Delegate)

Source:
EndpointRouteBuilderExtensions.cs

Adds a RouteEndpoint to the IEndpointRouteBuilder that matches HTTP requests for the specified HTTP methods and pattern.

public static Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapMethods (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, System.Collections.Generic.IEnumerable<string> httpMethods, Delegate handler);
static member MapMethods : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * seq<string> * Delegate -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder
<Extension()>
Public Function MapMethods (endpoints As IEndpointRouteBuilder, pattern As String, httpMethods As IEnumerable(Of String), handler As Delegate) As RouteHandlerBuilder

Parameters

endpoints
IEndpointRouteBuilder

The IEndpointRouteBuilder to add the route to.

pattern
String

The route pattern.

httpMethods
IEnumerable<String>

HTTP methods that the endpoint will match.

handler
Delegate

The delegate executed when the endpoint is matched.

Returns

A RouteHandlerBuilder that can be used to further customize the endpoint.

Applies to