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

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

Méthodes publiques

Méthode Description
RegisterArea ( System.Web.Mvc.AreaRegistrationContext context ) : void

Méthodes protégées

Méthode 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 méthode

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
Résultat void

RegisterArea() public méthode

public RegisterArea ( System.Web.Mvc.AreaRegistrationContext context ) : void
context System.Web.Mvc.AreaRegistrationContext
Résultat void

RegisterMarkupDecorator() protected méthode

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 .
Résultat void

RegisterViewModel() protected méthode

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

RegisterViewModel() protected méthode

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".
Résultat void