MvcAreaRouteBuilderExtensions.MapAreaRoute 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
MapAreaRoute(IRouteBuilder, String, String, String) |
使用指定的MVC區域,將路由新增至具有指定 |
MapAreaRoute(IRouteBuilder, String, String, String, Object) |
使用指定的 |
MapAreaRoute(IRouteBuilder, String, String, String, Object, Object) |
使用指定的 |
MapAreaRoute(IRouteBuilder, String, String, String, Object, Object, Object) |
使用指定的 |
MapAreaRoute(IRouteBuilder, String, String, String)
使用指定的MVC區域,將路由新增至具有指定 name
、areaName
和 template
的 IRouteBuilder。
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
、template
和 defaults
,將路由新增至具有指定之 MVC 區域的 IRouteBuilder。
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)
使用指定的 name
、areaName
、template
、defaults
和 constraints
,將路由新增至具有指定MVC區域的 IRouteBuilder。
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)
使用指定的 name
、areaName
、template
、defaults
、constraints
和 dataTokens
,將路由新增至具有指定之MVC區域的 IRouteBuilder。
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
物件,包含路由的數據令牌。 對象的屬性代表數據標記的名稱和值。
傳回
作業完成後,這個實例的參考。