Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Class ContentScannerExtension

Class that can be subclassed to add logis during content scanning/registration

Inheritance
System.Object
ContentScannerExtension
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: 11.20.7
Syntax
public class ContentScannerExtension
Remarks

To be part of synchronization/scanning subclass should be registered in IOC container with ServiceConfiguration attribute.

Constructors

ContentScannerExtension()

Declaration
public ContentScannerExtension()

Properties

ModelScanner

Gets or sets the model scanner.

Declaration
public IContentTypeModelScanner ModelScanner { get; set; }
Property Value
Type Description
IContentTypeModelScanner

The model scanner.

Remarks

This is set in runtime to the executing scanner.

Methods

AssignAvailableTypes(ContentTypeModel)

Override to assigns available types to availiable type service.

Declaration
public virtual void AssignAvailableTypes(ContentTypeModel contentypeModel)
Parameters
Type Name Description
ContentTypeModel contentypeModel

The contentype model.

AssignValuesFromModel(ContentType, ContentTypeModel)

Override to modify the values added by default.

Declaration
public virtual void AssignValuesFromModel(ContentType contentType, ContentTypeModel contentModel)
Parameters
Type Name Description
ContentType contentType

Type of the content.

ContentTypeModel contentModel

The content model.

AssignValuesToModel(ContentTypeModel)

Override to assign valuse to model before it is registered as ContentType

Declaration
public virtual void AssignValuesToModel(ContentTypeModel typeModel)
Parameters
Type Name Description
ContentTypeModel typeModel

The type model.

AssignValuesToProperties(ContentTypeModel)

Override to modify the properties model done by default assigner.

Declaration
public virtual void AssignValuesToProperties(ContentTypeModel contentTypeModel)
Parameters
Type Name Description
ContentTypeModel contentTypeModel

The content type model.

ResolveDependentContentTypes(ContentTypeModel)

Should return other content types that specified content type is dependent on. The returned list should be ordered so deepest dependency is returned first.

Declaration
public virtual IEnumerable<Type> ResolveDependentContentTypes(ContentTypeModel model)
Parameters
Type Name Description
ContentTypeModel model

The model to examine

Returns
Type Description
System.Collections.Generic.IEnumerable<System.Type>

An ordered list of dependencies

ShouldIgnoreProperty(ContentTypeModel, PropertyInfo)

Override to determine if a backing property PropertyData should be created for .net property.

Declaration
public virtual bool ShouldIgnoreProperty(ContentTypeModel contentTypeModel, PropertyInfo property)
Parameters
Type Name Description
ContentTypeModel contentTypeModel

The content type model.

System.Reflection.PropertyInfo property

The property.

Returns
Type Description
System.Boolean

Validate(IEnumerable<ContentTypeModel>)

Override to add custom validation.

Declaration
public virtual void Validate(IEnumerable<ContentTypeModel> typeModels)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentTypeModel> typeModels

The type models.

Extension Methods