C# Class Castle.MicroKernel.SubSystems.Conversion.DefaultComplexConverter

Inheritance: AbstractTypeConverter
Mostra file Open project: nats/castle-1.0.3-mono

Private Properties

Property Type Description
ChooseConstructor System.Reflection.ConstructorInfo
ConvertChildParameter object
ConvertConstructorParameters object[]
ConvertPropertyValues void
CreateInstance object
FindChildIgnoreCase IConfiguration

Public Methods

Method Description
CanHandleType ( Type type ) : bool
PerformConversion ( IConfiguration configuration, Type targetType ) : object
PerformConversion ( string value, Type targetType ) : object

Private Methods

Method Description
ChooseConstructor ( Type type ) : ConstructorInfo

Chooses the first non default constructor. Throws an exception if more than one non default constructor is found

ConvertChildParameter ( IConfiguration config, Type type ) : object
ConvertConstructorParameters ( ConstructorInfo constructor, IConfiguration configuration ) : object[]

Converts the constructor parameters.

ConvertPropertyValues ( object instance, Type type, IConfiguration configuration ) : void

Converts the property values.

CreateInstance ( Type type, IConfiguration configuration ) : object

Creates the target type instance.

FindChildIgnoreCase ( IConfiguration config, string name ) : IConfiguration

Finds the child (case insensitive).

Method Details

CanHandleType() public method

public CanHandleType ( Type type ) : bool
type System.Type
return bool

PerformConversion() public method

public PerformConversion ( IConfiguration configuration, Type targetType ) : object
configuration IConfiguration
targetType System.Type
return object

PerformConversion() public method

public PerformConversion ( string value, Type targetType ) : object
value string
targetType System.Type
return object