C# Class ModelBuilder.TypeCreatorBase

The TypeCreatorBase class is used to provide the common implementation of a type creator.
Inheritance: ITypeCreator
Datei anzeigen Open project: roryprimrose/ModelBuilder

Public Methods

Method Description
CanCreate ( Type type, string referenceName, LinkedList buildChain ) : bool
CanPopulate ( Type type, string referenceName, LinkedList buildChain ) : bool
Create ( Type type, string referenceName, LinkedList buildChain ) : object
Populate ( object instance, IExecuteStrategy executeStrategy ) : object

Protected Methods

Method Description
CreateInstance ( Type type, string referenceName, LinkedList buildChain ) : object

Creates an instance of the type with the specified arguments.

PopulateInstance ( object instance, IExecuteStrategy executeStrategy ) : object

Populates the specified instance using an execution strategy.

VerifyCreateRequest ( Type type, string referenceName, LinkedList buildChain ) : void

Verifies that the minimum required information has been provided in order to create an instance.

VerifyPopulateRequest ( Type type, string referenceName, LinkedList buildChain ) : void

Verifies that the minimum required information has been provided in order to populate an instance.

Method Details

CanCreate() public method

The parameter is null.
public CanCreate ( Type type, string referenceName, LinkedList buildChain ) : bool
type System.Type
referenceName string
buildChain LinkedList
return bool

CanPopulate() public method

The parameter is null.
public CanPopulate ( Type type, string referenceName, LinkedList buildChain ) : bool
type System.Type
referenceName string
buildChain LinkedList
return bool

Create() public method

The parameter is null.
public Create ( Type type, string referenceName, LinkedList buildChain ) : object
type System.Type
referenceName string
buildChain LinkedList
return object

CreateInstance() protected abstract method

Creates an instance of the type with the specified arguments.
protected abstract CreateInstance ( Type type, string referenceName, LinkedList buildChain ) : object
type System.Type The type of instance to create.
referenceName string Identifies the possible parameter or property name the instance is intended for.
buildChain LinkedList The chain of instances built up to this point.
return object

Populate() public method

The parameter is null. The parameter is null.
public Populate ( object instance, IExecuteStrategy executeStrategy ) : object
instance object
executeStrategy IExecuteStrategy
return object

PopulateInstance() protected abstract method

Populates the specified instance using an execution strategy.
protected abstract PopulateInstance ( object instance, IExecuteStrategy executeStrategy ) : object
instance object The instance to populate.
executeStrategy IExecuteStrategy The execution strategy.
return object

VerifyCreateRequest() protected method

Verifies that the minimum required information has been provided in order to create an instance.
The parameter is null. This generator does not support creating the requested value.
protected VerifyCreateRequest ( Type type, string referenceName, LinkedList buildChain ) : void
type System.Type The type of value to generate.
referenceName string Identifies the possible parameter or property name this value is intended for.
buildChain LinkedList The chain of instances built up to this point.
return void

VerifyPopulateRequest() protected method

Verifies that the minimum required information has been provided in order to populate an instance.
The parameter is null. This generator does not support creating the requested value.
protected VerifyPopulateRequest ( Type type, string referenceName, LinkedList buildChain ) : void
type System.Type The type to evaluate.
referenceName string Identifies the possible parameter or property name the instance is intended for.
buildChain LinkedList The chain of instances built up to this point.
return void