Export (0) Print
Expand All

AreaRegistration.RegisterAllAreas Method (Object)

Registers all areas in an ASP.NET MVC application by using the specified user-defined information.

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

public static void RegisterAllAreas(
	Object state
)

Parameters

state
Type: System.Object
An object that contains user-defined information to pass to the area.

The RegisterAllAreas method finds all types in the application domain that derive from AreaRegistration and calls each of their RegisterArea methods.

The state parameter enables you to pass any kind of information to the area that is being registered. For example, you might want the area to have some or all of the following information:

  • A reference to the HttpApplication object.

  • Repository information.

  • A reference to a log.

  • A reference to an Inversion of Control (IOC) container.

Show:
© 2015 Microsoft