Provides a static method to construct other entities with a more flexible parameter ordering:
More...
|
| static T | Construct< T > (params object[] args) |
| | Attempts to construct the type T with the provided constructor parameters, re-ordering as necessary.
|
| static T | Construct< T > (ConstructFlags flags, params object[] args) |
| | Attempts to construct the type T with the provided constructor parameters, re-ordering as necessary.
|
| static T | Construct< T > (Func< Type, object > fallbackFactory, params object[] args) |
| | Attempts to construct the type T with the provided constructor parameters, re-ordering as necessary. The provided fallbackFactory is used for missing dependencies instead of simply providing the default value.
|
| static T | Construct< T > (Func< Type, object > fallbackFactory, ConstructFlags flags, params object[] args) |
| | Attempts to construct the type T with the provided constructor parameters, re-ordering as necessary. The provided fallbackFactory is used for missing dependencies instead of simply providing the default value.
|
Provides a static method to construct other entities with a more flexible parameter ordering:
- parameters are fed in the order of "first with matching type"
- missing parameters are fed in as the default value for the type
◆ Construct< T >() [1/4]
| T PeanutButter.Utils.FlexiConstructor.Construct< T > |
( |
ConstructFlags | flags, |
|
|
params object[] | args ) |
|
static |
Attempts to construct the type T with the provided constructor parameters, re-ordering as necessary.
- Parameters
-
- Template Parameters
-
- Returns
◆ Construct< T >() [2/4]
| T PeanutButter.Utils.FlexiConstructor.Construct< T > |
( |
Func< Type, object > | fallbackFactory, |
|
|
ConstructFlags | flags, |
|
|
params object[] | args ) |
|
static |
Attempts to construct the type T with the provided constructor parameters, re-ordering as necessary. The provided fallbackFactory is used for missing dependencies instead of simply providing the default value.
- Parameters
-
| fallbackFactory | |
| flags | |
| args | |
- Template Parameters
-
- Returns
◆ Construct< T >() [3/4]
| T PeanutButter.Utils.FlexiConstructor.Construct< T > |
( |
Func< Type, object > | fallbackFactory, |
|
|
params object[] | args ) |
|
static |
Attempts to construct the type T with the provided constructor parameters, re-ordering as necessary. The provided fallbackFactory is used for missing dependencies instead of simply providing the default value.
- Parameters
-
- Template Parameters
-
- Returns
◆ Construct< T >() [4/4]
| T PeanutButter.Utils.FlexiConstructor.Construct< T > |
( |
params object[] | args | ) |
|
|
static |
Attempts to construct the type T with the provided constructor parameters, re-ordering as necessary.
- will provide default values for missing parameters
- will attempt basic type changes to satisfy the constructor
- Parameters
-
- Template Parameters
-
- Returns
The documentation for this class was generated from the following file:
- source/Utils/PeanutButter.Utils/FlexiConstructor.cs