Method | Description | |
---|---|---|
AutoContentAttribute ( string name, |
When applied to a code-first document type class this attribute instructs the code-first initialiser to create a document instance of that type, if it does not exist. This attribute should only be applied to classes which inherit DocumentTypeBase and which also have a [DocumentType] attribute. The values for the document instance can either be configured in a parameterless constructor of the document type class or in the InitialiseDefaults method if the class implements IAutoContent
|
|
Initialise ( |
Initialises the Factory property based on the type to which the attribute is applied.
|
Method | Description | |
---|---|---|
ConstructFactory ( DocumentTypeBase values ) : IContentFactory |
Automatically constructs a factory for any inheritor of DocumentTypeBase
|
|
GetValues ( |
Gets the document instance values for use in creating the default content
|
public AutoContentAttribute ( string name, |
||
name | string | The name of the document node |
parentType |
/// |
|
sortOrder | int | The sort order for the document amongst its' siblings |
return | System |
protected ConstructFactory ( DocumentTypeBase values ) : IContentFactory | ||
values | DocumentTypeBase | The document type to create |
return | IContentFactory |
protected GetValues ( |
||
targetType | The document type | |
return | DocumentTypeBase |
public Initialise ( |
||
targetType | The type to which the attribute is applied | |
return | void |