MapExtensions.Map 方法

定义

重载

Map(IApplicationBuilder, PathString, Action<IApplicationBuilder>)

根据给定请求路径的匹配项对请求管道进行分支。 如果请求路径以给定路径开头,则执行分支。

Map(IApplicationBuilder, String, Action<IApplicationBuilder>)

根据给定请求路径的匹配项对请求管道进行分支。 如果请求路径以给定路径开头,则执行分支。

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

根据给定请求路径的匹配项对请求管道进行分支。 如果请求路径以给定路径开头,则执行分支。

Map(IApplicationBuilder, PathString, Action<IApplicationBuilder>)

根据给定请求路径的匹配项对请求管道进行分支。 如果请求路径以给定路径开头,则执行分支。

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>)

根据给定请求路径的匹配项对请求管道进行分支。 如果请求路径以给定路径开头,则执行分支。

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>)

根据给定请求路径的匹配项对请求管道进行分支。 如果请求路径以给定路径开头,则执行分支。

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 实例。

适用于