AreaRegistration.RegisterAllAreas Method

 

Registers all areas in an ASP.NET MVC application.

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

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticRegisterAllAreas()

Registers all areas in an ASP.NET MVC application.

System_CAPS_pubmethodSystem_CAPS_staticRegisterAllAreas(Object)

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

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

Return to top

AreaRegistration.RegisterAllAreas Method ()

Registers all areas in an ASP.NET MVC application.

public static void RegisterAllAreas()

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

Return to top

AreaRegistration.RegisterAllAreas Method (Object)

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

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.

Return to top
Show: