MvcAreaRouteBuilderExtensions.MapAreaRoute 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
MapAreaRoute(IRouteBuilder, String, String, String) |
使用指定的 |
MapAreaRoute(IRouteBuilder, String, String, String, Object) |
使用指定的 |
MapAreaRoute(IRouteBuilder, String, String, String, Object, Object) |
将路由添加到IRouteBuilder具有指定 、、 |
MapAreaRoute(IRouteBuilder, String, String, String, Object, Object, Object) |
将路由添加到IRouteBuilder具有指定 、、、 |
MapAreaRoute(IRouteBuilder, String, String, String)
使用指定的 name
、 areaName
和 template
将路由添加到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)
使用指定的 name
、areaName
IRouteBuilder、 template
和 defaults
将路由添加到具有给定 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)
将路由添加到IRouteBuilder具有指定 、、areaName
、 template
defaults
和 constraints
的name
给定 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)
将路由添加到IRouteBuilder具有指定 、、、areaName
defaults
template
、 constraints
和 dataTokens
的name
给定 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
一个 对象,该对象包含路由的数据令牌。 对象的属性表示数据令牌的名称和值。
返回
完成操作后对此实例的引用。