Class ViewRegistrator
Scan views for partial block views.
Inheritance
System.Object
ViewRegistrator
Implements
Namespace: EPiServer.DataAbstraction.RuntimeModel.Internal
Assembly: EPiServer.Cms.AspNetCore.Mvc.dll
Version: 12.0.3Syntax
public class ViewRegistrator : Object, IViewRegistrator
Constructors
ViewRegistrator(ITypeScannerLookup, IEnumerable<IContentTypeModelScanner>, ITemplateRepository, ICompositeViewEngine, IVirtualPathResolver)
Initializes a new instance of the View
Declaration
public ViewRegistrator(ITypeScannerLookup typeScannerLookup, IEnumerable<IContentTypeModelScanner> contentTypeModelScanner, ITemplateRepository templateModelRepository, ICompositeViewEngine viewEngine, IVirtualPathResolver virtualPathResolver)
Parameters
Type | Name | Description |
---|---|---|
IType |
typeScannerLookup | |
System. |
contentTypeModelScanner | |
ITemplate |
templateModelRepository | |
Microsoft. |
viewEngine | |
IVirtual |
virtualPathResolver |
Methods
RegisterTemplate(Type, TemplateModel, Boolean)
Called when a template given by Template
Declaration
protected virtual void RegisterTemplate(Type modelType, TemplateModel templateModel, bool throwOnAlreadyRegisteredView)
Parameters
Type | Name | Description |
---|---|---|
System. |
modelType | Type of the model. |
Template |
templateModel | The template model. |
System. |
throwOnAlreadyRegisteredView | Indication if an excpetion should be thrown if there is already a view template registered with same name |
Exceptions
Type | Condition |
---|---|
System. |
RegisterViews(HttpContext)
Registers the scanned views in the EPi
Declaration
public virtual void RegisterViews(HttpContext httpContext)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
httpContext | The http context. |