RequestDelegateRouteBuilderExtensions.MapVerb 方法

定义

重载

MapVerb(IRouteBuilder, String, String, RequestDelegate)

向 添加一个路由,该路由 IRouteBuilder 仅匹配给定 verbtemplatehandler的 HTTP 请求。

MapVerb(IRouteBuilder, String, String, Action<IApplicationBuilder>)

向 添加一个路由,该路由 IRouteBuilder 仅匹配给定 verbtemplateaction的 HTTP 请求。

MapVerb(IRouteBuilder, String, String, Func<HttpRequest,HttpResponse,RouteData,Task>)

向 添加一个路由,该路由 IRouteBuilder 仅匹配给定 verbtemplatehandler的 HTTP 请求。

MapVerb(IRouteBuilder, String, String, RequestDelegate)

Source:
RequestDelegateRouteBuilderExtensions.cs
Source:
RequestDelegateRouteBuilderExtensions.cs
Source:
RequestDelegateRouteBuilderExtensions.cs

向 添加一个路由,该路由 IRouteBuilder 仅匹配给定 verbtemplatehandler的 HTTP 请求。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Routing::IRouteBuilder ^ MapVerb(Microsoft::AspNetCore::Routing::IRouteBuilder ^ builder, System::String ^ verb, System::String ^ template, Microsoft::AspNetCore::Http::RequestDelegate ^ handler);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapVerb (this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string verb, string template, Microsoft.AspNetCore.Http.RequestDelegate handler);
static member MapVerb : Microsoft.AspNetCore.Routing.IRouteBuilder * string * string * Microsoft.AspNetCore.Http.RequestDelegate -> Microsoft.AspNetCore.Routing.IRouteBuilder
<Extension()>
Public Function MapVerb (builder As IRouteBuilder, verb As String, template As String, handler As RequestDelegate) As IRouteBuilder

参数

verb
String

路由允许的 HTTP 谓词。

template
String

路由模板。

handler
RequestDelegate

路由 RequestDelegate 处理程序。

返回

此操作完成后对 builder 的引用。

适用于

MapVerb(IRouteBuilder, String, String, Action<IApplicationBuilder>)

向 添加一个路由,该路由 IRouteBuilder 仅匹配给定 verbtemplateaction的 HTTP 请求。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Routing::IRouteBuilder ^ MapVerb(Microsoft::AspNetCore::Routing::IRouteBuilder ^ builder, System::String ^ verb, System::String ^ template, Action<Microsoft::AspNetCore::Builder::IApplicationBuilder ^> ^ action);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapVerb (this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string verb, string template, Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> action);
static member MapVerb : Microsoft.AspNetCore.Routing.IRouteBuilder * string * string * Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> -> Microsoft.AspNetCore.Routing.IRouteBuilder
<Extension()>
Public Function MapVerb (builder As IRouteBuilder, verb As String, template As String, action As Action(Of IApplicationBuilder)) As IRouteBuilder

参数

verb
String

路由允许的 HTTP 谓词。

template
String

路由模板。

action
Action<IApplicationBuilder>

要应用于 的操作 IApplicationBuilder

返回

此操作完成后对 builder 的引用。

适用于

MapVerb(IRouteBuilder, String, String, Func<HttpRequest,HttpResponse,RouteData,Task>)

Source:
RequestDelegateRouteBuilderExtensions.cs
Source:
RequestDelegateRouteBuilderExtensions.cs
Source:
RequestDelegateRouteBuilderExtensions.cs

向 添加一个路由,该路由 IRouteBuilder 仅匹配给定 verbtemplatehandler的 HTTP 请求。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Routing::IRouteBuilder ^ MapVerb(Microsoft::AspNetCore::Routing::IRouteBuilder ^ builder, System::String ^ verb, System::String ^ template, Func<Microsoft::AspNetCore::Http::HttpRequest ^, Microsoft::AspNetCore::Http::HttpResponse ^, Microsoft::AspNetCore::Routing::RouteData ^, System::Threading::Tasks::Task ^> ^ handler);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapVerb (this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string verb, string template, Func<Microsoft.AspNetCore.Http.HttpRequest,Microsoft.AspNetCore.Http.HttpResponse,Microsoft.AspNetCore.Routing.RouteData,System.Threading.Tasks.Task> handler);
static member MapVerb : Microsoft.AspNetCore.Routing.IRouteBuilder * string * string * Func<Microsoft.AspNetCore.Http.HttpRequest, Microsoft.AspNetCore.Http.HttpResponse, Microsoft.AspNetCore.Routing.RouteData, System.Threading.Tasks.Task> -> Microsoft.AspNetCore.Routing.IRouteBuilder
<Extension()>
Public Function MapVerb (builder As IRouteBuilder, verb As String, template As String, handler As Func(Of HttpRequest, HttpResponse, RouteData, Task)) As IRouteBuilder

参数

verb
String

路由允许的 HTTP 谓词。

template
String

路由模板。

handler
Func<HttpRequest,HttpResponse,RouteData,Task>

路由处理程序。

返回

此操作完成后对 builder 的引用。

适用于