Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

AreaRegistrationContext Class

.NET Framework 4

Encapsulates the information that is required in order to register an area within an ASP.NET MVC application.

System.Object
  System.Web.Mvc.AreaRegistrationContext

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)
public class AreaRegistrationContext

The AreaRegistrationContext type exposes the following members.

  NameDescription
Public methodAreaRegistrationContext(String, RouteCollection)Initializes a new instance of the AreaRegistrationContext class using the specified area name and routes collection.
Public methodAreaRegistrationContext(String, RouteCollection, Object)Initializes a new instance of the AreaRegistrationContext class using the specified area name, routes collection, and user-defined data.
Top
  NameDescription
Public propertyAreaNameGets the name of the area to register.
Public propertyNamespacesGets the namespaces for the application.
Public propertyRoutesGets a collection of defined routes for the application.
Public propertyStateGets an object that contains user-defined information to pass to the area.
Top
  NameDescription
Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodMapRoute(String, String)Maps the specified URL route and associates it with the area that is specified by the AreaName property.
Public methodMapRoute(String, String, Object)Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified route default values.
Public methodMapRoute(String, String, String[])Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified namespaces.
Public methodMapRoute(String, String, Object, Object)Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified route default values and constraint.
Public methodMapRoute(String, String, Object, String[])Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified route default values and namespaces.
Public methodMapRoute(String, String, Object, Object, String[])Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified route default values, constraints, and namespaces.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The primary use of this context object is to call one of the area-enabled MapRoute method overloads, which mirror MapRoute methods.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.