RequestDelegateRouteBuilderExtensions.MapMiddlewareVerb 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
向 添加一个路由,该路由 IRouteBuilder 仅匹配给定 verb
、 template
和 action
的 HTTP 请求。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Routing::IRouteBuilder ^ MapMiddlewareVerb(Microsoft::AspNetCore::Routing::IRouteBuilder ^ builder, System::String ^ verb, System::String ^ template, Action<Microsoft::AspNetCore::Builder::IApplicationBuilder ^> ^ action);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapMiddlewareVerb (this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string verb, string template, Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> action);
static member MapMiddlewareVerb : Microsoft.AspNetCore.Routing.IRouteBuilder * string * string * Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> -> Microsoft.AspNetCore.Routing.IRouteBuilder
<Extension()>
Public Function MapMiddlewareVerb (builder As IRouteBuilder, verb As String, template As String, action As Action(Of IApplicationBuilder)) As IRouteBuilder
参数
- builder
- IRouteBuilder
- verb
- String
路由允许的 HTTP 谓词。
- template
- String
路由模板。
- action
- Action<IApplicationBuilder>
要应用于 的操作 IApplicationBuilder。
返回
此操作完成后对 builder
的引用。