共用方式為


MvcAreaRouteBuilderExtensions.MapAreaRoute 方法

定義

多載

MapAreaRoute(IRouteBuilder, String, String, String)

使用指定的MVC區域,將路由新增至具有指定 nameareaNametemplateIRouteBuilder

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

使用指定的 nameareaNametemplatedefaults,將路由新增至具有指定之 MVC 區域的 IRouteBuilder

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

使用指定的 nameareaNametemplatedefaultsconstraints,將路由新增至具有指定MVC區域的 IRouteBuilder

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

使用指定的 nameareaNametemplatedefaultsconstraintsdataTokens,將路由新增至具有指定之MVC區域的 IRouteBuilder

MapAreaRoute(IRouteBuilder, String, String, String)

來源:
MvcAreaRouteBuilderExtensions.cs
來源:
MvcAreaRouteBuilderExtensions.cs
來源:
MvcAreaRouteBuilderExtensions.cs

使用指定的MVC區域,將路由新增至具有指定 nameareaNametemplateIRouteBuilder

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)

來源:
MvcAreaRouteBuilderExtensions.cs
來源:
MvcAreaRouteBuilderExtensions.cs
來源:
MvcAreaRouteBuilderExtensions.cs

使用指定的 nameareaNametemplatedefaults,將路由新增至具有指定之 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)

來源:
MvcAreaRouteBuilderExtensions.cs
來源:
MvcAreaRouteBuilderExtensions.cs
來源:
MvcAreaRouteBuilderExtensions.cs

使用指定的 nameareaNametemplatedefaultsconstraints,將路由新增至具有指定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)

來源:
MvcAreaRouteBuilderExtensions.cs
來源:
MvcAreaRouteBuilderExtensions.cs
來源:
MvcAreaRouteBuilderExtensions.cs

使用指定的 nameareaNametemplatedefaultsconstraintsdataTokens,將路由新增至具有指定之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

物件,包含路由的數據令牌。 對象的屬性代表數據標記的名稱和值。

傳回

作業完成後,這個實例的參考。

適用於