共用方式為


MapExtensions.Map 方法

定義

多載

Map(IApplicationBuilder, PathString, Action<IApplicationBuilder>)

根據指定要求路徑的相符專案,將要求管線分支。 如果要求路徑以指定路徑為開頭,則會執行分支。

Map(IApplicationBuilder, String, Action<IApplicationBuilder>)

根據指定要求路徑的相符專案,將要求管線分支。 如果要求路徑以指定路徑為開頭,則會執行分支。

Map(IApplicationBuilder, PathString, Boolean, Action<IApplicationBuilder>)

根據指定要求路徑的相符專案,將要求管線分支。 如果要求路徑以指定路徑為開頭,則會執行分支。

Map(IApplicationBuilder, PathString, Action<IApplicationBuilder>)

來源:
MapExtensions.cs
來源:
MapExtensions.cs
來源:
MapExtensions.cs

根據指定要求路徑的相符專案,將要求管線分支。 如果要求路徑以指定路徑為開頭,則會執行分支。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ Map(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Http::PathString pathMatch, Action<Microsoft::AspNetCore::Builder::IApplicationBuilder ^> ^ configuration);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder Map (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString pathMatch, Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> configuration);
static member Map : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Http.PathString * Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function Map (app As IApplicationBuilder, pathMatch As PathString, configuration As Action(Of IApplicationBuilder)) As IApplicationBuilder

參數

pathMatch
PathString

要比對的要求路徑。

configuration
Action<IApplicationBuilder>

要用於正路徑相符專案的分支。

傳回

IApplicationBuilder 執行個體。

適用於

Map(IApplicationBuilder, String, Action<IApplicationBuilder>)

來源:
MapExtensions.cs

根據指定要求路徑的相符專案,將要求管線分支。 如果要求路徑以指定路徑為開頭,則會執行分支。

public static Microsoft.AspNetCore.Builder.IApplicationBuilder Map (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string pathMatch, Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> configuration);
static member Map : Microsoft.AspNetCore.Builder.IApplicationBuilder * string * Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function Map (app As IApplicationBuilder, pathMatch As String, configuration As Action(Of IApplicationBuilder)) As IApplicationBuilder

參數

pathMatch
String

要比對的要求路徑。

configuration
Action<IApplicationBuilder>

要用於正路徑相符專案的分支。

傳回

IApplicationBuilder 執行個體。

適用於

Map(IApplicationBuilder, PathString, Boolean, Action<IApplicationBuilder>)

來源:
MapExtensions.cs

根據指定要求路徑的相符專案,將要求管線分支。 如果要求路徑以指定路徑為開頭,則會執行分支。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ Map(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Http::PathString pathMatch, bool preserveMatchedPathSegment, Action<Microsoft::AspNetCore::Builder::IApplicationBuilder ^> ^ configuration);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder Map (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString pathMatch, bool preserveMatchedPathSegment, Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> configuration);
static member Map : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Http.PathString * bool * Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function Map (app As IApplicationBuilder, pathMatch As PathString, preserveMatchedPathSegment As Boolean, configuration As Action(Of IApplicationBuilder)) As IApplicationBuilder

參數

pathMatch
PathString

要比對的要求路徑。

preserveMatchedPathSegment
Boolean

如果為 false,則會從 Request.Path 移除相符的路徑,並新增至 Request.PathBase。

configuration
Action<IApplicationBuilder>

要用於正路徑相符專案的分支。

傳回

IApplicationBuilder 執行個體。

適用於