Class ContentTypeModelScanner
Creates a Content
Inheritance
Implements
Namespace: EPiServer.DataAbstraction.RuntimeModel.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
[ServiceConfiguration]
public class ContentTypeModelScanner : Object, IContentTypeModelScanner
Constructors
ContentTypeModelScanner(ITypeScannerLookup, ContentTypeModelRegister, ContentModelValidator, ContentTypeModelRepository, IContentTypeModelAssigner, ContentDataInterceptorHandler, ContentDataInterceptor, IEnumerable<IContentTypeModelFilter>, IEnumerable<ContentScannerExtension>, IAvailableModelSettingsRepository, IContentTypeModelScannerEventsRaiser)
Initializes a new instance of the Content
Declaration
public ContentTypeModelScanner(ITypeScannerLookup typeScannerLookup, ContentTypeModelRegister typeModelRegister, ContentModelValidator modelValidator, ContentTypeModelRepository contentTypeModelRepository, IContentTypeModelAssigner contentTypeModelAssigner, ContentDataInterceptorHandler modelTypeInterceptorHandler, ContentDataInterceptor modelTypeInterceptor, IEnumerable<IContentTypeModelFilter> filters, IEnumerable<ContentScannerExtension> registerExtensions, IAvailableModelSettingsRepository availableContentTypeService, IContentTypeModelScannerEventsRaiser contentTypeModelScannerEvents)
Parameters
Type | Name | Description |
---|---|---|
IType |
typeScannerLookup | |
Content |
typeModelRegister | |
Content |
modelValidator | |
Content |
contentTypeModelRepository | |
IContent |
contentTypeModelAssigner | |
Content |
modelTypeInterceptorHandler | |
Content |
modelTypeInterceptor | |
System. |
filters | |
System. |
registerExtensions | |
IAvailable |
availableContentTypeService | |
IContent |
contentTypeModelScannerEvents |
Properties
ContentTypes
Gets content types in the system.
Declaration
public virtual IEnumerable<Type> ContentTypes { get; }
Property Value
Type | Description |
---|---|
System. |
DeleteUnusedContentTypes
Gets a value indicating whether unused content types should be deleted
Declaration
protected virtual bool DeleteUnusedContentTypes { get; }
Property Value
Type | Description |
---|---|
System. |
|
Remarks
returns true.
IgnoredTypes
Gets the types that are ignored during scanning.
Declaration
public virtual IEnumerable<Type> IgnoredTypes { get; }
Property Value
Type | Description |
---|---|
System. |
The ignored types. |
Remarks
RunSynchronously
If methods should run without parallellism
Declaration
public bool RunSynchronously { get; set; }
Property Value
Type | Description |
---|---|
System. |
Methods
AddModel(Type)
Adds a model with the specified type.
Declaration
public virtual void AddModel(Type type)
Parameters
Type | Name | Description |
---|---|---|
System. |
type | The type. |
AssignAvailableTypes(ContentTypeModel)
Register settings for which types that should be available under a specific type.
Declaration
protected virtual void AssignAvailableTypes(ContentTypeModel typeModel)
Parameters
Type | Name | Description |
---|---|---|
Content |
typeModel | The type model. |
AssignValuesToModel(ContentTypeModel)
Creates a type model and adds it to the collection of types.
Declaration
protected virtual void AssignValuesToModel(ContentTypeModel typeModel)
Parameters
Type | Name | Description |
---|---|---|
Content |
typeModel | The type model. |
AssignValuesToProperties(ContentTypeModel)
Assigns values to modelType
.
Declaration
protected virtual void AssignValuesToProperties(ContentTypeModel modelType)
Parameters
Type | Name | Description |
---|---|---|
Content |
modelType | Type of the model. |
CreateModel(Type)
Creates a model.
Declaration
protected virtual ContentTypeModel CreateModel(Type type)
Parameters
Type | Name | Description |
---|---|---|
System. |
type | The type to create the model from. |
Returns
Type | Description |
---|---|
Content |
EagerCompileProxies()
Creates a task that compiles proxies for all types that has automatic getters/setters.
Declaration
protected virtual void EagerCompileProxies()
GetProperties(ContentTypeModel)
Gets properties on the modelType
.
Declaration
public virtual IEnumerable<PropertyInfo> GetProperties(ContentTypeModel modelType)
Parameters
Type | Name | Description |
---|---|---|
Content |
modelType | The model to get properties from. |
Returns
Type | Description |
---|---|
System. |
Register(ContentTypeModel)
Registers the specified type model.
Declaration
protected virtual void Register(ContentTypeModel typeModel)
Parameters
Type | Name | Description |
---|---|---|
Content |
typeModel | The type model. |
RegisterDependentModels(ContentTypeModel)
Declaration
protected virtual void RegisterDependentModels(ContentTypeModel typeModel)
Parameters
Type | Name | Description |
---|---|---|
Content |
typeModel |
RegisterModels()
Registers the models with the repositories.
Declaration
public virtual IList<Task> RegisterModels()
Returns
Type | Description |
---|---|
System. |
A list of started tasks. |
Remarks
The registration is complete when all returned task are completed.
Sync(Boolean)
Creates Content
Declaration
public virtual IList<Task> Sync(bool commitChanges)
Parameters
Type | Name | Description |
---|---|---|
System. |
commitChanges | if set to |
Returns
Type | Description |
---|---|
System. |
A list of started tasks. |
Remarks
The registration is complete when all returned task are completed.