EndpointRouteBuilderExtensions.MapMethods 方法

定义

重载

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

将 添加到RouteEndpointIEndpointRouteBuilder与指定 HTTP 方法和模式的 HTTP 请求匹配的 。

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

将 添加到RouteEndpointIEndpointRouteBuilder与指定 HTTP 方法和模式的 HTTP 请求匹配的 。

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

Source:
EndpointRouteBuilderExtensions.cs

将 添加到RouteEndpointIEndpointRouteBuilder与指定 HTTP 方法和模式的 HTTP 请求匹配的 。

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

参数

endpoints
IEndpointRouteBuilder

IEndpointRouteBuilder要向其添加路由的 。

pattern
String

路由模式。

httpMethods
IEnumerable<String>

终结点将匹配的 HTTP 方法。

requestDelegate
RequestDelegate

终结点匹配时执行的委托。

返回

可用于 IEndpointConventionBuilder 进一步自定义终结点的 。

适用于

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

Source:
EndpointRouteBuilderExtensions.cs

将 添加到RouteEndpointIEndpointRouteBuilder与指定 HTTP 方法和模式的 HTTP 请求匹配的 。

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

参数

endpoints
IEndpointRouteBuilder

IEndpointRouteBuilder要向其添加路由的 。

pattern
String

路由模式。

httpMethods
IEnumerable<String>

终结点将匹配的 HTTP 方法。

handler
Delegate

终结点匹配时执行的委托。

返回

可用于 RouteHandlerBuilder 进一步自定义终结点的 。

适用于