Class TypeInstanceFactory
Inheritance
TypeInstanceFactory
Syntax
public static class TypeInstanceFactory
Methods
Construct<TValue, TInput>(TInput)
Constructs an instance of based on the given value.
Declaration
public static TValue Construct<TValue, TInput>(TInput source)
Parameters
Type |
Name |
Description |
TInput |
source |
The source value containing the data for construction.
|
Returns
Type |
Description |
TValue |
A new instance of the destination type
|
Type Parameters
Name |
Description |
TValue |
The destination type to construct.
|
TInput |
The source type containing type information.
|
IsRegistered<TValue, TInput>()
Declaration
public static bool IsRegistered<TValue, TInput>()
Returns
Type Parameters
Name |
Description |
TValue |
|
TInput |
|
Register<TValue>(TypeInstanceFactory.ITypeConstructor<TValue>)
Declaration
public static void Register<TValue>(TypeInstanceFactory.ITypeConstructor<TValue> handler)
Parameters
Type Parameters
Register<TInput, TValue>(TypeInstanceFactory.ITypeConstructor<TInput, TValue>)
Declaration
public static void Register<TInput, TValue>(TypeInstanceFactory.ITypeConstructor<TInput, TValue> handler)
Parameters
Type Parameters
Name |
Description |
TInput |
|
TValue |
|
TryConstruct<TValue, TInput>(TInput, out TValue)
Declaration
public static bool TryConstruct<TValue, TInput>(TInput source, out TValue value)
Parameters
Type |
Name |
Description |
TInput |
source |
|
TValue |
value |
|
Returns
Type Parameters
Name |
Description |
TValue |
|
TInput |
|