C# Class Sdl.Web.Mvc.Configuration.BaseAreaRegistration

Abstract base class for DXA-style area registration.
Inheritance: System.Web.Mvc.AreaRegistration
Mostrar archivo Open project: sdl/dxa-web-application-dotnet

Public Methods

Method Description
RegisterArea ( System.Web.Mvc.AreaRegistrationContext context ) : void

Protected Methods

Method Description
RegisterAllViewModels ( ) : void

Automatically register all view models for an area. This is done by searching the file system for all .cshtml files, determining the controller and view names from the path, and using the BuildManager to determine the model type by compiling the view. Note that if your area contains a lot of views, this can be a lengthy process and you might be better off explicitly registering your views with the RegisterViewModel method

RegisterMarkupDecorator ( Type markupDecoratorType ) : void

Registers a IMarkupDecorator implementation.

RegisterViewModel ( Type modelType ) : void

Registers a View Model without associated View.

RegisterViewModel ( string viewName, Type modelType, string controllerName = null ) : void

Registers a View Model and associated View.

Method Details

RegisterAllViewModels() protected method

Automatically register all view models for an area. This is done by searching the file system for all .cshtml files, determining the controller and view names from the path, and using the BuildManager to determine the model type by compiling the view. Note that if your area contains a lot of views, this can be a lengthy process and you might be better off explicitly registering your views with the RegisterViewModel method
protected RegisterAllViewModels ( ) : void
return void

RegisterArea() public method

public RegisterArea ( System.Web.Mvc.AreaRegistrationContext context ) : void
context System.Web.Mvc.AreaRegistrationContext
return void

RegisterMarkupDecorator() protected method

Registers a IMarkupDecorator implementation.
protected RegisterMarkupDecorator ( Type markupDecoratorType ) : void
markupDecoratorType System.Type The type of the markup decorator. The type must have a parameterless constructor and implement .
return void

RegisterViewModel() protected method

Registers a View Model without associated View.
protected RegisterViewModel ( Type modelType ) : void
modelType System.Type The View Model type.
return void

RegisterViewModel() protected method

Registers a View Model and associated View.
protected RegisterViewModel ( string viewName, Type modelType, string controllerName = null ) : void
viewName string The name of the View to register.
modelType System.Type The View Model Type to associate with the View. Must be a subclass of Type .
controllerName string The Controller name. If not specified (or null), the Controller name is inferred from the : either "Entity", "Region" or "Page".
return void