Class ActivatorUtility
Provide ways to work more efficient with System.Activator related tasks.
Inheritance
Namespace: Cuemon.Reflection
Assembly: Cuemon.Reflection.dll
Syntax
public static class ActivatorUtility
Methods
| Improve this DocCreateInstance<TResult>()
Creates an instance of TResult
using the parameterless constructor.
Declaration
public static TResult CreateInstance<TResult>()
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
TResult | The type to create. |
CreateInstance<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(T1, T2, T3, T4, T5, T6, T7, T8, T9)
Creates an instance of TResult
using a constructor of nine parameters.
Declaration
public static TResult CreateInstance<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9)
Parameters
Type | Name | Description |
---|---|---|
T1 | arg1 | The first parameter of the constructor. |
T2 | arg2 | The second parameter of the constructor. |
T3 | arg3 | The third parameter of the constructor. |
T4 | arg4 | The fourth parameter of the constructor. |
T5 | arg5 | The fifth parameter of the constructor. |
T6 | arg6 | The sixth parameter of the constructor. |
T7 | arg7 | The seventh parameter of the constructor. |
T8 | arg8 | The eighth parameter of the constructor. |
T9 | arg9 | The ninth parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the constructor. |
T2 | The type of the second parameter of the constructor. |
T3 | The type of the third parameter of the constructor. |
T4 | The type of the fourth parameter of the constructor. |
T5 | The type of the fifth parameter of the constructor. |
T6 | The type of the sixth parameter of the constructor. |
T7 | The type of the seventh parameter of the constructor. |
T8 | The type of the eighth parameter of the constructor. |
T9 | The type of the ninth parameter of the constructor. |
TResult | The type to create. |
CreateInstance<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
Creates an instance of TResult
using a constructor of ten parameters.
Declaration
public static TResult CreateInstance<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10)
Parameters
Type | Name | Description |
---|---|---|
T1 | arg1 | The first parameter of the constructor. |
T2 | arg2 | The second parameter of the constructor. |
T3 | arg3 | The third parameter of the constructor. |
T4 | arg4 | The fourth parameter of the constructor. |
T5 | arg5 | The fifth parameter of the constructor. |
T6 | arg6 | The sixth parameter of the constructor. |
T7 | arg7 | The seventh parameter of the constructor. |
T8 | arg8 | The eighth parameter of the constructor. |
T9 | arg9 | The ninth parameter of the constructor. |
T10 | arg10 | The tenth parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the constructor. |
T2 | The type of the second parameter of the constructor. |
T3 | The type of the third parameter of the constructor. |
T4 | The type of the fourth parameter of the constructor. |
T5 | The type of the fifth parameter of the constructor. |
T6 | The type of the sixth parameter of the constructor. |
T7 | The type of the seventh parameter of the constructor. |
T8 | The type of the eighth parameter of the constructor. |
T9 | The type of the ninth parameter of the constructor. |
T10 | The type of the tenth parameter of the constructor. |
TResult | The type to create. |
CreateInstance<T, TResult>(T)
Creates an instance of TResult
using a constructor of one parameters.
Declaration
public static TResult CreateInstance<T, TResult>(T arg)
Parameters
Type | Name | Description |
---|---|---|
T | arg | The parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T | The type of the parameter of the constructor. |
TResult | The type to create. |
CreateInstance<T1, T2, TResult>(T1, T2)
Creates an instance of TResult
using a constructor of two parameters.
Declaration
public static TResult CreateInstance<T1, T2, TResult>(T1 arg1, T2 arg2)
Parameters
Type | Name | Description |
---|---|---|
T1 | arg1 | The first parameter of the constructor. |
T2 | arg2 | The second parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the constructor. |
T2 | The type of the second parameter of the constructor. |
TResult | The type to create. |
CreateInstance<T1, T2, T3, TResult>(T1, T2, T3)
Creates an instance of TResult
using a constructor of three parameters.
Declaration
public static TResult CreateInstance<T1, T2, T3, TResult>(T1 arg1, T2 arg2, T3 arg3)
Parameters
Type | Name | Description |
---|---|---|
T1 | arg1 | The first parameter of the constructor. |
T2 | arg2 | The second parameter of the constructor. |
T3 | arg3 | The third parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the constructor. |
T2 | The type of the second parameter of the constructor. |
T3 | The type of the third parameter of the constructor. |
TResult | The type to create. |
CreateInstance<T1, T2, T3, T4, TResult>(T1, T2, T3, T4)
Creates an instance of TResult
using a constructor of four parameters.
Declaration
public static TResult CreateInstance<T1, T2, T3, T4, TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4)
Parameters
Type | Name | Description |
---|---|---|
T1 | arg1 | The first parameter of the constructor. |
T2 | arg2 | The second parameter of the constructor. |
T3 | arg3 | The third parameter of the constructor. |
T4 | arg4 | The fourth parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the constructor. |
T2 | The type of the second parameter of the constructor. |
T3 | The type of the third parameter of the constructor. |
T4 | The type of the fourth parameter of the constructor. |
TResult | The type to create. |
CreateInstance<T1, T2, T3, T4, T5, TResult>(T1, T2, T3, T4, T5)
Creates an instance of TResult
using a constructor of five parameters.
Declaration
public static TResult CreateInstance<T1, T2, T3, T4, T5, TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
Parameters
Type | Name | Description |
---|---|---|
T1 | arg1 | The first parameter of the constructor. |
T2 | arg2 | The second parameter of the constructor. |
T3 | arg3 | The third parameter of the constructor. |
T4 | arg4 | The fourth parameter of the constructor. |
T5 | arg5 | The fifth parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the constructor. |
T2 | The type of the second parameter of the constructor. |
T3 | The type of the third parameter of the constructor. |
T4 | The type of the fourth parameter of the constructor. |
T5 | The type of the fifth parameter of the constructor. |
TResult | The type to create. |
CreateInstance<T1, T2, T3, T4, T5, T6, TResult>(T1, T2, T3, T4, T5, T6)
Creates an instance of TResult
using a constructor of six parameters.
Declaration
public static TResult CreateInstance<T1, T2, T3, T4, T5, T6, TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
Parameters
Type | Name | Description |
---|---|---|
T1 | arg1 | The first parameter of the constructor. |
T2 | arg2 | The second parameter of the constructor. |
T3 | arg3 | The third parameter of the constructor. |
T4 | arg4 | The fourth parameter of the constructor. |
T5 | arg5 | The fifth parameter of the constructor. |
T6 | arg6 | The sixth parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the constructor. |
T2 | The type of the second parameter of the constructor. |
T3 | The type of the third parameter of the constructor. |
T4 | The type of the fourth parameter of the constructor. |
T5 | The type of the fifth parameter of the constructor. |
T6 | The type of the sixth parameter of the constructor. |
TResult | The type to create. |
CreateInstance<T1, T2, T3, T4, T5, T6, T7, TResult>(T1, T2, T3, T4, T5, T6, T7)
Creates an instance of TResult
using a constructor of seven parameters.
Declaration
public static TResult CreateInstance<T1, T2, T3, T4, T5, T6, T7, TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7)
Parameters
Type | Name | Description |
---|---|---|
T1 | arg1 | The first parameter of the constructor. |
T2 | arg2 | The second parameter of the constructor. |
T3 | arg3 | The third parameter of the constructor. |
T4 | arg4 | The fourth parameter of the constructor. |
T5 | arg5 | The fifth parameter of the constructor. |
T6 | arg6 | The sixth parameter of the constructor. |
T7 | arg7 | The seventh parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the constructor. |
T2 | The type of the second parameter of the constructor. |
T3 | The type of the third parameter of the constructor. |
T4 | The type of the fourth parameter of the constructor. |
T5 | The type of the fifth parameter of the constructor. |
T6 | The type of the sixth parameter of the constructor. |
T7 | The type of the seventh parameter of the constructor. |
TResult | The type to create. |
CreateInstance<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(T1, T2, T3, T4, T5, T6, T7, T8)
Creates an instance of TResult
using a constructor of eight parameters.
Declaration
public static TResult CreateInstance<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8)
Parameters
Type | Name | Description |
---|---|---|
T1 | arg1 | The first parameter of the constructor. |
T2 | arg2 | The second parameter of the constructor. |
T3 | arg3 | The third parameter of the constructor. |
T4 | arg4 | The fourth parameter of the constructor. |
T5 | arg5 | The fifth parameter of the constructor. |
T6 | arg6 | The sixth parameter of the constructor. |
T7 | arg7 | The seventh parameter of the constructor. |
T8 | arg8 | The eighth parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the constructor. |
T2 | The type of the second parameter of the constructor. |
T3 | The type of the third parameter of the constructor. |
T4 | The type of the fourth parameter of the constructor. |
T5 | The type of the fifth parameter of the constructor. |
T6 | The type of the sixth parameter of the constructor. |
T7 | The type of the seventh parameter of the constructor. |
T8 | The type of the eighth parameter of the constructor. |
TResult | The type to create. |