November Happy Hour will be moved to Thursday December 5th.

Class RenderTemplateScanner

Default implementation of IRenderTemplateScanner. This implementation locates all classes that implements IRenderTemplate<TModel> and registers them.

Inheritance
System.Object
RenderTemplateScanner
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.DataAbstraction.RuntimeModel
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
[ServiceConfiguration(typeof(IRenderTemplateScanner))]
public class RenderTemplateScanner : IRenderTemplateScanner

Constructors

RenderTemplateScanner(ITemplatePathResolver, ITypeScannerLookup, TemplateModelRepository, IModuleResourceResolver)

Initializes a new instance of the RenderTemplateScanner class.

Declaration
public RenderTemplateScanner(ITemplatePathResolver templatePathResolver, ITypeScannerLookup typeScannerLookup, TemplateModelRepository templateModelRepository, IModuleResourceResolver resourcePathResolver)
Parameters
Type Name Description
ITemplatePathResolver templatePathResolver

The template path resolver.

ITypeScannerLookup typeScannerLookup

The scanned type repository.

TemplateModelRepository templateModelRepository

The render template repository.

IModuleResourceResolver resourcePathResolver

The resource path resolver.

RenderTemplateScanner(ITemplatePathResolver, ITypeScannerLookup, TemplateModelRepository, ModuleTable)

Initializes a new instance of the RenderTemplateScanner class.

Declaration
[Obsolete("Use other constructor")]
public RenderTemplateScanner(ITemplatePathResolver templatePathResolver, ITypeScannerLookup typeScannerLookup, TemplateModelRepository templateModelRepository, ModuleTable moduleTable)
Parameters
Type Name Description
ITemplatePathResolver templatePathResolver

The template path resolver.

ITypeScannerLookup typeScannerLookup

The scanned type repository.

TemplateModelRepository templateModelRepository

The render template repository.

ModuleTable moduleTable

The Shell module table.

Properties

SupportedInterfaces

Gets a list of supported interfaces to check for.

Declaration
[Obsolete("Modifications to SupportedInterfaces are no longer supported as the rest of the framework are dependent on the default ones.")]
protected virtual IEnumerable<Type> SupportedInterfaces { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.Type>

The supported interfaces.

Remarks

The default implementation will return IRenderTemplate<TModel> and IRenderTemplate.

Methods

GetRenderTypes()

Get a list of all types matching the basic rendering template requirements.

Declaration
protected virtual IEnumerable<Type> GetRenderTypes()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Type>

A list of non-abstract types that implements IRenderTemplate and that not has any unspecified generic type parameters.

RegisterScannedRenders()

Registers any render templates found by type scanner in the TemplateModelRepository.

Declaration
public virtual void RegisterScannedRenders()

RegisterTemplate(Type, TemplateModel[])

Called to register a model and the templates

Declaration
protected virtual void RegisterTemplate(Type modelType, params TemplateModel[] templates)
Parameters
Type Name Description
System.Type modelType

The model type

TemplateModel[] templates

A list of templates

Implements

Extension Methods