A wrapper class around a ConversionDelegate<T, Q>.
Type parameters:
| TSource | |
| TTarget |
Constructors
Properties
Derived
Gets whether this is a derived conversion. Derived conversions are automatically added at runtime by the ConversionServer when a conversion for a less derived type can be found and tweaked to work for a more derived type.
Explanation
Gets the explanation (if any) attached to the conversion method.
Methods
Convert
#public void Convert(TSource from, out TTarget to)
Perform strongly typed conversion. This method will throw if the underlying delegate throws. Use the TryConvert(TSource, TTarget) methods to add proper error handling.
Parameters:
| from (TSource) | |
| to (out TTarget) |
ConvertWeak
#Perform the conversion from ConversionAction.SourceType to ConversionAction.TargetType. This method will throw if the types do not match up, or if the underlying delegate throws. Use the ConversionAction.TryConvertWeak(object, object) methods to add proper error handling.
Overrides: ConversionAction.ConvertWeak
TryConvert
#Execute a conversion action with error handling.
Parameters:
| source (TSource) | |
| target (out TTarget) | |
| failure (out string) |
TryConvert
#Execute a conversion action with error handling.
Parameters:
| source (TSource) | |
| target (out TTarget) |
TryConvertWeak
Execute the conversion with error handling.