메소드 | 설명 | |
---|---|---|
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.
|
메소드 | 설명 | |
---|---|---|
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 |
리턴 | System |
protected ConstructFactory ( DocumentTypeBase values ) : IContentFactory | ||
values | DocumentTypeBase | The document type to create |
리턴 | IContentFactory |
protected GetValues ( |
||
targetType | The document type | |
리턴 | DocumentTypeBase |
public Initialise ( |
||
targetType | The type to which the attribute is applied | |
리턴 | void |