MvcAreaRouteBuilderExtensions Class¶
Extension methods for Microsoft.AspNetCore.Routing.IRouteBuilder
.
- Namespace
Microsoft.AspNetCore.Builder
- Assemblies
- Microsoft.AspNetCore.Mvc.Core
Syntax¶
public class MvcAreaRouteBuilderExtensions
-
class
Microsoft.AspNetCore.Builder.
MvcAreaRouteBuilderExtensions
Methods¶
-
MapAreaRoute
(Microsoft.AspNetCore.Routing.IRouteBuilder, System.String, System.String, System.String)¶ Adds a route to the
Microsoft.AspNetCore.Routing.IRouteBuilder
with the given MVC area with the specified <em>name</em>, <em>areaName</em> and <em>template</em>.Arguments: - routeBuilder (Microsoft.AspNetCore.Routing.IRouteBuilder) – The
Microsoft.AspNetCore.Routing.IRouteBuilder
to add the route to. - name (System.String) – The name of the route.
- areaName (System.String) – The MVC area name.
- template (System.String) – The URL pattern of the route.
Return type: Returns: A reference to this instance after the operation has completed.
public static IRouteBuilder MapAreaRoute(this IRouteBuilder routeBuilder, string name, string areaName, string template)
- routeBuilder (Microsoft.AspNetCore.Routing.IRouteBuilder) – The
-
MapAreaRoute
(Microsoft.AspNetCore.Routing.IRouteBuilder, System.String, System.String, System.String, System.Object) Adds a route to the
Microsoft.AspNetCore.Routing.IRouteBuilder
with the given MVC area with the specified <em>name</em>, <em>areaName</em>, <em>template</em>, and <em>defaults</em>.Arguments: - routeBuilder (Microsoft.AspNetCore.Routing.IRouteBuilder) – The
Microsoft.AspNetCore.Routing.IRouteBuilder
to add the route to. - name (System.String) – The name of the route.
- areaName (System.String) – The MVC area name.
- template (System.String) – The URL pattern of the route.
- defaults (System.Object) – An object that contains default values for route parameters. The object’s properties represent the names and values of the default values.
Return type: Returns: A reference to this instance after the operation has completed.
public static IRouteBuilder MapAreaRoute(this IRouteBuilder routeBuilder, string name, string areaName, string template, object defaults)
- routeBuilder (Microsoft.AspNetCore.Routing.IRouteBuilder) – The
-
MapAreaRoute
(Microsoft.AspNetCore.Routing.IRouteBuilder, System.String, System.String, System.String, System.Object, System.Object) Adds a route to the
Microsoft.AspNetCore.Routing.IRouteBuilder
with the given MVC area with the specified <em>name</em>, <em>areaName</em>, <em>template</em>, <em>defaults</em>, and <em>constraints</em>.Arguments: - routeBuilder (Microsoft.AspNetCore.Routing.IRouteBuilder) – The
Microsoft.AspNetCore.Routing.IRouteBuilder
to add the route to. - name (System.String) – The name of the route.
- areaName (System.String) – The MVC area name.
- template (System.String) – The URL pattern of the route.
- defaults (System.Object) – An object that contains default values for route parameters. The object’s properties represent the names and values of the default values.
- constraints (System.Object) – An object that contains constraints for the route. The object’s properties represent the names and values of the constraints.
Return type: Returns: A reference to this instance after the operation has completed.
public static IRouteBuilder MapAreaRoute(this IRouteBuilder routeBuilder, string name, string areaName, string template, object defaults, object constraints)
- routeBuilder (Microsoft.AspNetCore.Routing.IRouteBuilder) – The
-
MapAreaRoute
(Microsoft.AspNetCore.Routing.IRouteBuilder, System.String, System.String, System.String, System.Object, System.Object, System.Object) Adds a route to the
Microsoft.AspNetCore.Routing.IRouteBuilder
with the given MVC area with the specified <em>name</em>, <em>areaName</em>, <em>template</em>, <em>defaults</em>, <em>constraints</em>, and <em>dataTokens</em>.Arguments: - routeBuilder (Microsoft.AspNetCore.Routing.IRouteBuilder) – The
Microsoft.AspNetCore.Routing.IRouteBuilder
to add the route to. - name (System.String) – The name of the route.
- areaName (System.String) – The MVC area name.
- template (System.String) – The URL pattern of the route.
- defaults (System.Object) – An object that contains default values for route parameters. The object’s properties represent the names and values of the default values.
- constraints (System.Object) – An object that contains constraints for the route. The object’s properties represent the names and values of the constraints.
- dataTokens (System.Object) – An object that contains data tokens for the route. The object’s properties represent the names and values of the data tokens.
Return type: Returns: A reference to this instance after the operation has completed.
public static IRouteBuilder MapAreaRoute(this IRouteBuilder routeBuilder, string name, string areaName, string template, object defaults, object constraints, object dataTokens)
- routeBuilder (Microsoft.AspNetCore.Routing.IRouteBuilder) – The
-