Sdílet prostřednictvím


AreaRegistrationContext Class

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

Inheritance Hierarchy

System.Object
  System.Web.Mvc.AreaRegistrationContext

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

'Declaration
Public Class AreaRegistrationContext
public class AreaRegistrationContext
public ref class AreaRegistrationContext

The AreaRegistrationContext type exposes the following members.

Constructors

  Name Description
Public method AreaRegistrationContext(String, RouteCollection) Initializes a new instance of the AreaRegistrationContext class using the specified area name and routes collection.
Public method AreaRegistrationContext(String, RouteCollection, Object) Initializes a new instance of the AreaRegistrationContext class using the specified area name, routes collection, and user-defined data.

Top

Properties

  Name Description
Public property AreaName Gets the name of the area to register.
Public property Namespaces Gets the namespaces for the application.
Public property Routes Gets a collection of defined routes for the application.
Public property State Gets an object that contains user-defined information to pass to the area.

Top

Methods

  Name Description
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method MapRoute(String, String) Maps the specified URL route and associates it with the area that is specified by the AreaName property.
Public method MapRoute(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 method MapRoute(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 method MapRoute(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 method MapRoute(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 method MapRoute(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 method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

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

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Web.Mvc Namespace