C# Class Felinesoft.UmbracoCodeFirst.Attributes.ContentFactoryAttribute

Inheritance: System.Attribute
Exibir arquivo Open project: DanMannMann/UmbracoCodeFirst

Public Methods

Method Description
ContentFactoryAttribute ( Type factory, int sortOrder = 10 ) : System

Registers a content factory to be used to create default content for a document type

Protected Methods

Method Description
ContentFactoryAttribute ( int sortOrder = 10 ) : System

Inheritors can call this if they want to construct their own factory (useful if your factory type has constructor parameters or other initialisation requirements). The inheritor will need to assign the constructed factory to the ContentFactoryAttribute.Factory property, which has a protected setter for this purpose, within its constructor.

Method Details

ContentFactoryAttribute() public method

Registers a content factory to be used to create default content for a document type

public ContentFactoryAttribute ( Type factory, int sortOrder = 10 ) : System
factory System.Type A type with a parameterless constructor which implements IContentFactory
sortOrder int The sort order for the document amongst its' siblings
return System

ContentFactoryAttribute() protected method

Inheritors can call this if they want to construct their own factory (useful if your factory type has constructor parameters or other initialisation requirements). The inheritor will need to assign the constructed factory to the ContentFactoryAttribute.Factory property, which has a protected setter for this purpose, within its constructor.
protected ContentFactoryAttribute ( int sortOrder = 10 ) : System
sortOrder int The sort order for the document amongst its' siblings
return System