MvcAreaRouteBuilderExtensions.MapAreaRoute 方法

定义

重载

MapAreaRoute(IRouteBuilder, String, String, String)

使用指定的 nameareaNametemplate将路由添加到IRouteBuilder具有给定 MVC 区域的 。

MapAreaRoute(IRouteBuilder, String, String, String, Object)

使用指定的 nameareaNameIRouteBuildertemplatedefaults将路由添加到具有给定 MVC 区域的 。

MapAreaRoute(IRouteBuilder, String, String, String, Object, Object)

将路由添加到IRouteBuilder具有指定 、、areaNametemplatedefaultsconstraintsname给定 MVC 区域的 。

MapAreaRoute(IRouteBuilder, String, String, String, Object, Object, Object)

将路由添加到IRouteBuilder具有指定 、、、areaNamedefaultstemplateconstraintsdataTokensname给定 MVC 区域的 。

MapAreaRoute(IRouteBuilder, String, String, String)

Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs

使用指定的 nameareaNametemplate将路由添加到IRouteBuilder具有给定 MVC 区域的 。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Routing::IRouteBuilder ^ MapAreaRoute(Microsoft::AspNetCore::Routing::IRouteBuilder ^ routeBuilder, System::String ^ name, System::String ^ areaName, System::String ^ template);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string template);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string? template);
static member MapAreaRoute : Microsoft.AspNetCore.Routing.IRouteBuilder * string * string * string -> Microsoft.AspNetCore.Routing.IRouteBuilder
<Extension()>
Public Function MapAreaRoute (routeBuilder As IRouteBuilder, name As String, areaName As String, template As String) As IRouteBuilder

参数

routeBuilder
IRouteBuilder

IRouteBuilder 向其添加路由的 。

name
String

路由的名称。

areaName
String

MVC 区域名称。

template
String

路由的 URL 模式。

返回

完成操作后对此实例的引用。

适用于

MapAreaRoute(IRouteBuilder, String, String, String, Object)

Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs

使用指定的 nameareaNameIRouteBuildertemplatedefaults将路由添加到具有给定 MVC 区域的 。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Routing::IRouteBuilder ^ MapAreaRoute(Microsoft::AspNetCore::Routing::IRouteBuilder ^ routeBuilder, System::String ^ name, System::String ^ areaName, System::String ^ template, System::Object ^ defaults);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string template, object defaults);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string? template, object? defaults);
static member MapAreaRoute : Microsoft.AspNetCore.Routing.IRouteBuilder * string * string * string * obj -> Microsoft.AspNetCore.Routing.IRouteBuilder
<Extension()>
Public Function MapAreaRoute (routeBuilder As IRouteBuilder, name As String, areaName As String, template As String, defaults As Object) As IRouteBuilder

参数

routeBuilder
IRouteBuilder

IRouteBuilder 向其添加路由的 。

name
String

路由的名称。

areaName
String

MVC 区域名称。

template
String

路由的 URL 模式。

defaults
Object

一个对象,该对象包含路由参数的默认值。 对象的属性表示默认值的名称和值。

返回

完成操作后对此实例的引用。

适用于

MapAreaRoute(IRouteBuilder, String, String, String, Object, Object)

Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs

将路由添加到IRouteBuilder具有指定 、、areaNametemplatedefaultsconstraintsname给定 MVC 区域的 。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Routing::IRouteBuilder ^ MapAreaRoute(Microsoft::AspNetCore::Routing::IRouteBuilder ^ routeBuilder, System::String ^ name, System::String ^ areaName, System::String ^ template, System::Object ^ defaults, System::Object ^ constraints);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string template, object defaults, object constraints);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string? template, object? defaults, object? constraints);
static member MapAreaRoute : Microsoft.AspNetCore.Routing.IRouteBuilder * string * string * string * obj * obj -> Microsoft.AspNetCore.Routing.IRouteBuilder
<Extension()>
Public Function MapAreaRoute (routeBuilder As IRouteBuilder, name As String, areaName As String, template As String, defaults As Object, constraints As Object) As IRouteBuilder

参数

routeBuilder
IRouteBuilder

IRouteBuilder 向其添加路由的 。

name
String

路由的名称。

areaName
String

MVC 区域名称。

template
String

路由的 URL 模式。

defaults
Object

一个对象,该对象包含路由参数的默认值。 对象的属性表示默认值的名称和值。

constraints
Object

一个对象,其中包含路由的约束。 对象的属性表示约束的名称和值。

返回

完成操作后对此实例的引用。

适用于

MapAreaRoute(IRouteBuilder, String, String, String, Object, Object, Object)

Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs

将路由添加到IRouteBuilder具有指定 、、、areaNamedefaultstemplateconstraintsdataTokensname给定 MVC 区域的 。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Routing::IRouteBuilder ^ MapAreaRoute(Microsoft::AspNetCore::Routing::IRouteBuilder ^ routeBuilder, System::String ^ name, System::String ^ areaName, System::String ^ template, System::Object ^ defaults, System::Object ^ constraints, System::Object ^ dataTokens);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string template, object defaults, object constraints, object dataTokens);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string? template, object? defaults, object? constraints, object? dataTokens);
static member MapAreaRoute : Microsoft.AspNetCore.Routing.IRouteBuilder * string * string * string * obj * obj * obj -> Microsoft.AspNetCore.Routing.IRouteBuilder
<Extension()>
Public Function MapAreaRoute (routeBuilder As IRouteBuilder, name As String, areaName As String, template As String, defaults As Object, constraints As Object, dataTokens As Object) As IRouteBuilder

参数

routeBuilder
IRouteBuilder

IRouteBuilder 向其添加路由的 。

name
String

路由的名称。

areaName
String

MVC 区域名称。

template
String

路由的 URL 模式。

defaults
Object

一个对象,该对象包含路由参数的默认值。 对象的属性表示默认值的名称和值。

constraints
Object

一个对象,其中包含路由的约束。 对象的属性表示约束的名称和值。

dataTokens
Object

一个 对象,该对象包含路由的数据令牌。 对象的属性表示数据令牌的名称和值。

返回

完成操作后对此实例的引用。

适用于