RequestDelegateRouteBuilderExtensions.MapPost 方法

定义

重载

MapPost(IRouteBuilder, String, RequestDelegate)

将一个仅与给定 template的 HTTP POST 请求匹配的 路由IRouteBuilder添加到 handler

MapPost(IRouteBuilder, String, Action<IApplicationBuilder>)

将一个仅与给定 template的 HTTP POST 请求匹配的 路由IRouteBuilder添加到 action

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

将一个仅与给定 template的 HTTP POST 请求匹配的 路由IRouteBuilder添加到 handler

MapPost(IRouteBuilder, String, RequestDelegate)

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

将一个仅与给定 template的 HTTP POST 请求匹配的 路由IRouteBuilder添加到 handler

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

参数

template
String

路由模板。

handler
RequestDelegate

路由 RequestDelegate 处理程序。

返回

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

适用于

MapPost(IRouteBuilder, String, Action<IApplicationBuilder>)

将一个仅与给定 template的 HTTP POST 请求匹配的 路由IRouteBuilder添加到 action

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

参数

template
String

路由模板。

action
Action<IApplicationBuilder>

要应用于 的操作 IApplicationBuilder

返回

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

适用于

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

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

将一个仅与给定 template的 HTTP POST 请求匹配的 路由IRouteBuilder添加到 handler

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

参数

template
String

路由模板。

handler
Func<HttpRequest,HttpResponse,RouteData,Task>

路由处理程序。

返回

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

适用于