C# Class ModelBuilder.DefaultExecuteStrategy

The DefaultExecuteStrategy{T} class is used to create types and populate instances.
Inheritance: IExecuteStrategy
Datei anzeigen Open project: roryprimrose/ModelBuilder

Public Methods

Method Description
CreateWith ( Type type ) : object
Initialize ( IBuildConfiguration configuration, IBuildLog buildLog ) : void
Populate ( object instance ) : object

Protected Methods

Method Description
Build ( Type type, string referenceName, object context ) : object

Builds an instance of the specified type.

PopulateInstance ( object instance ) : object

Populates the settable properties on the specified instance.

Private Methods

Method Description
BuildFailureException ( Type type, string referenceName, object context ) : Exception
CreateAndPopulate ( Type type, string referenceName, LinkedList buildChain, object args, ITypeCreator typeCreator ) : object
CreateInstance ( ITypeCreator typeCreator, Type type, string referenceName, LinkedList buildChain, object args ) : object
EnsureInitialized ( ) : void
GetMaximumOrderPrority ( Type type, string propertyName ) : int
PopulateProperty ( object instance, PropertyInfo propertyInfo ) : void

Method Details

Build() protected method

Builds an instance of the specified type.
The parameter is null. The parameter can not be created using this strategy.
protected Build ( Type type, string referenceName, object context ) : object
type System.Type The type of instance to create.
referenceName string Identifies the possible parameter or property name this value is intended for.
context object The possible context object this value is being created for.
return object

CreateWith() public method

The parameter is null. /// No or was found to /// generate a requested type. /// Failed to generate a requested type.
public CreateWith ( Type type ) : object
type System.Type
return object

Initialize() public method

The parameter is null. The parameter is null.
public Initialize ( IBuildConfiguration configuration, IBuildLog buildLog ) : void
configuration IBuildConfiguration
buildLog IBuildLog
return void

Populate() public method

The parameter is null. /// No or was found to /// generate a requested type. /// Failed to generate a requested type.
public Populate ( object instance ) : object
instance object
return object

PopulateInstance() protected method

Populates the settable properties on the specified instance.
The parameter is null.
protected PopulateInstance ( object instance ) : object
instance object The instance to populate.
return object