ConversionAction
References- ConversionAction<TSource, TTarget>
A non-generic wrapper class around a ConversionDelegate<T, Q>.
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.
Methods
ConvertWeak
#Perform the conversion from SourceType to TargetType. This method will throw if the types do not match up, or if the underlying delegate throws. Use the TryConvertWeak(object, object) methods to add proper error handling.
TryConvertWeak
#Execute the conversion with error handling.
TryConvertWeak
#Execute the conversion with error handling.
TryDelegate<TSource, TTarget>
#public static bool TryDelegate<TSource, TTarget>(ConversionDelegate<TSource, TTarget> method, TSource source, out TTarget target, out Merit merit, out string explanation)
Run a conversion delegate method.
Parameters:
| method (ConversionDelegate<TSource, TTarget>) | |
| source (TSource) | |
| target (out TTarget) | |
| merit (out Merit) | |
| explanation (out string) |
TryDelegate<TSource, TTarget>
#public static bool TryDelegate<TSource, TTarget>(ConversionDelegate<TSource, TTarget> method, TSource source, out TTarget target)
Run a conversion delegate method.
Parameters:
| method (ConversionDelegate<TSource, TTarget>) | |
| source (TSource) | |
| target (out TTarget) |