Provides extension method for merging multiple objects behind a required interface.
More...
|
static bool | CanMergeAs< T > (this IEnumerable< object > sources) |
| Tests if a collection of objects can back the given interface T.
|
static bool | CanFuzzyMergeAs< T > (this IEnumerable< object > sources) |
| Tests if a collection of objects can back the given interface T (fuzzy)
|
static T | MergeAs< T > (this IEnumerable< object > sources) |
| Attempts to merge a collection of objects onto one interface, first wins.
|
static T | MergeAs< T > (this IEnumerable< object > sources, bool throwOnError) |
| Attempts to merge a collection of objects onto one interface, first wins.
|
static T | FuzzyMergeAs< T > (this IEnumerable< object > sources) |
| Attempts to fuzzy-merge a collection of objects onto one interface, first wins.
|
static T | FuzzyMergeAs< T > (this IEnumerable< object > sources, bool throwOnError) |
| Attempts to fuzzy-merge a collection of objects onto one interface, first wins.
|
Provides extension method for merging multiple objects behind a required interface.
◆ CanFuzzyMergeAs< T >()
bool PeanutButter.DuckTyping.Extensions.MergingExtensions.CanFuzzyMergeAs< T > |
( |
this IEnumerable< object > | sources | ) |
|
|
static |
Tests if a collection of objects can back the given interface T (fuzzy)
- Parameters
-
- Template Parameters
-
- Returns
◆ CanMergeAs< T >()
bool PeanutButter.DuckTyping.Extensions.MergingExtensions.CanMergeAs< T > |
( |
this IEnumerable< object > | sources | ) |
|
|
static |
Tests if a collection of objects can back the given interface T.
- Parameters
-
- Template Parameters
-
- Returns
◆ FuzzyMergeAs< T >() [1/2]
T PeanutButter.DuckTyping.Extensions.MergingExtensions.FuzzyMergeAs< T > |
( |
this IEnumerable< object > | sources | ) |
|
|
static |
Attempts to fuzzy-merge a collection of objects onto one interface, first wins.
- Parameters
-
- Template Parameters
-
- Returns
◆ FuzzyMergeAs< T >() [2/2]
T PeanutButter.DuckTyping.Extensions.MergingExtensions.FuzzyMergeAs< T > |
( |
this IEnumerable< object > | sources, |
|
|
bool | throwOnError ) |
|
static |
Attempts to fuzzy-merge a collection of objects onto one interface, first wins.
- Parameters
-
- Template Parameters
-
- Returns
◆ MergeAs< T >() [1/2]
T PeanutButter.DuckTyping.Extensions.MergingExtensions.MergeAs< T > |
( |
this IEnumerable< object > | sources | ) |
|
|
static |
Attempts to merge a collection of objects onto one interface, first wins.
- Parameters
-
- Template Parameters
-
- Returns
◆ MergeAs< T >() [2/2]
T PeanutButter.DuckTyping.Extensions.MergingExtensions.MergeAs< T > |
( |
this IEnumerable< object > | sources, |
|
|
bool | throwOnError ) |
|
static |
Attempts to merge a collection of objects onto one interface, first wins.
- Parameters
-
- Template Parameters
-
- Returns
The documentation for this class was generated from the following file:
- source/Utils/PeanutButter.DuckTyping/Extensions/MergingExtensions.cs