共用方式為


RequestDelegateRouteBuilderExtensions.MapMiddlewareGet 方法

定義

將路由加入至 IRouteBuilder ,只符合指定 template 之 的 action HTTP GET 要求和 。

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

參數

template
String

路由範本。

action
Action<IApplicationBuilder>

要套用至 的 IApplicationBuilder 動作。

傳回

此作業完成之後的 builder 參考。

適用於