|
Joutsen
v0.4.1
|
A simple converter class that uses a static mapping for conversion. More...
Public Member Functions | |
| MappingConverter (Map< TSource, TTarget > mapping, TTarget defaultValue=default(TTarget)) | |
| Creates a new instance of the converter. More... | |
| TTarget | Convert (TSource source) |
Public Member Functions inherited from Joutsen.System.SimpleTypeConverter< TSource, TTarget > | |
| TargetType | Convert (SourceType value) |
Converts value into an instance of TTarget. More... | |
A simple converter class that uses a static mapping for conversion.
| Joutsen.System.MappingConverter< TSource, TTarget >.MappingConverter | ( | Map< TSource, TTarget > | mapping, |
| TTarget | defaultValue = default(TTarget) |
||
| ) |
Creates a new instance of the converter.
| mapping | the static mapping between the types used for conversion |
| defaultValue | the result of the conversion if the source value if not part of the mapping |
| TTarget Joutsen.System.MappingConverter< TSource, TTarget >.Convert | ( | TSource | source | ) |
1.8.13