Base class for common shim functionality.
More...
|
| object | ConvertWith (IConverter converter, object propValue, Type toType) |
| | Converts a property value from original type to another type using the provided converter.
|
| Type | MakeTypeToImplement (Type type, bool isFuzzy) |
| | Creates a new type to implement the requested interface type Used internally when fleshing out non-primitive properties.
|
Base class for common shim functionality.
◆ ConvertWith()
| object PeanutButter.DuckTyping.Shimming.ShimShamBase.ConvertWith |
( |
IConverter | converter, |
|
|
object | propValue, |
|
|
Type | toType ) |
|
protected |
Converts a property value from original type to another type using the provided converter.
- Parameters
-
| converter | Converts the value |
| propValue | Value to convert |
| toType | Required output type |
- Returns
- Value converted to required output type, where possible
◆ GetDefaultValueFor()
| object PeanutButter.DuckTyping.Shimming.ShimShamBase.GetDefaultValueFor |
( |
Type | correctType | ) |
|
|
static |
Gets the default value for a type.
- Parameters
-
| correctType | Type to find the default value for |
- Returns
- The value that would be returned by default(T) for that type
◆ MakeTypeToImplement()
| Type PeanutButter.DuckTyping.Shimming.ShimShamBase.MakeTypeToImplement |
( |
Type | type, |
|
|
bool | isFuzzy ) |
|
protected |
Creates a new type to implement the requested interface type Used internally when fleshing out non-primitive properties.
- Parameters
-
| type | Type to implement |
| isFuzzy | Flag to allow (or not) approximate / fuzzy ducking |
- Returns
- Type implementing requested interface
The documentation for this class was generated from the following file:
- source/Utils/PeanutButter.DuckTyping/Shimming/ShimShamBase.cs