Class ActivatorFactory
- Namespace
- Cuemon.Reflection
- Assembly
- Cuemon.Core.dll
Provides access to factory methods for creating instances of the specified generic type parameter.
public static class ActivatorFactory
- Inheritance
-
ActivatorFactory
Methods
CreateInstance<TInstance>(Action<ActivatorOptions>)
Creates an instance of TInstance using the parameterless constructor.
public static TInstance CreateInstance<TInstance>(Action<ActivatorOptions> setup = null)
Parameters
setupAction<ActivatorOptions>The ActivatorOptions which may be configured.
Returns
- TInstance
A reference to the newly created object.
Type Parameters
TInstanceThe type to create.
- See Also
CreateInstance<T, TInstance>(T, Action<ActivatorOptions>)
Creates an instance of TInstance using a constructor of one parameters.
public static TInstance CreateInstance<T, TInstance>(T arg, Action<ActivatorOptions> setup = null)
Parameters
argTThe parameter of the constructor.
setupAction<ActivatorOptions>The ActivatorOptions which may be configured.
Returns
- TInstance
A reference to the newly created object.
Type Parameters
TThe type of the parameter of the constructor.
TInstanceThe type to create.
- See Also
CreateInstance<T1, T2, TInstance>(T1, T2, Action<ActivatorOptions>)
Creates an instance of TInstance using a constructor of two parameters.
public static TInstance CreateInstance<T1, T2, TInstance>(T1 arg1, T2 arg2, Action<ActivatorOptions> setup = null)
Parameters
arg1T1The first parameter of the constructor.
arg2T2The second parameter of the constructor.
setupAction<ActivatorOptions>The ActivatorOptions which may be configured.
Returns
- TInstance
A reference to the newly created object.
Type Parameters
T1The type of the first parameter of the constructor.
T2The type of the second parameter of the constructor.
TInstanceThe type to create.
- See Also
CreateInstance<T1, T2, T3, TInstance>(T1, T2, T3, Action<ActivatorOptions>)
Creates an instance of TInstance using a constructor of three parameters.
public static TInstance CreateInstance<T1, T2, T3, TInstance>(T1 arg1, T2 arg2, T3 arg3, Action<ActivatorOptions> setup = null)
Parameters
arg1T1The first parameter of the constructor.
arg2T2The second parameter of the constructor.
arg3T3The third parameter of the constructor.
setupAction<ActivatorOptions>The ActivatorOptions which may be configured.
Returns
- TInstance
A reference to the newly created object.
Type Parameters
T1The type of the first parameter of the constructor.
T2The type of the second parameter of the constructor.
T3The type of the third parameter of the constructor.
TInstanceThe type to create.
- See Also
CreateInstance<T1, T2, T3, T4, TInstance>(T1, T2, T3, T4, Action<ActivatorOptions>)
Creates an instance of TInstance using a constructor of four parameters.
public static TInstance CreateInstance<T1, T2, T3, T4, TInstance>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<ActivatorOptions> setup = null)
Parameters
arg1T1The first parameter of the constructor.
arg2T2The second parameter of the constructor.
arg3T3The third parameter of the constructor.
arg4T4The fourth parameter of the constructor.
setupAction<ActivatorOptions>The ActivatorOptions which may be configured.
Returns
- TInstance
A reference to the newly created object.
Type Parameters
T1The type of the first parameter of the constructor.
T2The type of the second parameter of the constructor.
T3The type of the third parameter of the constructor.
T4The type of the fourth parameter of the constructor.
TInstanceThe type to create.
- See Also
CreateInstance<T1, T2, T3, T4, T5, TInstance>(T1, T2, T3, T4, T5, Action<ActivatorOptions>)
Creates an instance of TInstance using a constructor of five parameters.
public static TInstance CreateInstance<T1, T2, T3, T4, T5, TInstance>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<ActivatorOptions> setup = null)
Parameters
arg1T1The first parameter of the constructor.
arg2T2The second parameter of the constructor.
arg3T3The third parameter of the constructor.
arg4T4The fourth parameter of the constructor.
arg5T5The fifth parameter of the constructor.
setupAction<ActivatorOptions>The ActivatorOptions which may be configured.
Returns
- TInstance
A reference to the newly created object.
Type Parameters
T1The type of the first parameter of the constructor.
T2The type of the second parameter of the constructor.
T3The type of the third parameter of the constructor.
T4The type of the fourth parameter of the constructor.
T5The type of the fifth parameter of the constructor.
TInstanceThe type to create.
- See Also