ConversionRepository
ReferencesNothing matches.
Derive from this class to provide custom conversion methods. Add any number of public, static methods that adhere to the ConversionDelegate<TIn, TOut> signature, and which are decorated with the MeritAttribute attribute.
Fields
Methods
CustomError
#Create the custom formatted conversion exception.
InfiniteConversion
#Create the standard 'infinite conversion' exception, usually involving infinite values in the instance of typeA.
public static ConversionException InfiniteConversion()
typeA,
Source data type for conversion.
typeB,
Target data type of conversion.
nameA = null,
Optional custom type name.
nameB = null
Optional custom type name.
InvalidConversion
#Create the standard 'invalid conversion' exception, usually involving NaN or Unset values in the instance of typeA.
public static ConversionException InvalidConversion()
typeA,
Source data type for conversion.
typeB,
Target data type of conversion.
nameA = null,
Optional custom type name.
nameB = null
Optional custom type name.
IsZero
#Test whether a number is considered zero by conversion logic.
MissingConversion
#Create the standard 'missing conversion' exception.
public static ConversionException MissingConversion()
typeA,
Source data type for conversion.
typeB,
Target data type of conversion.
nameA = null,
Optional custom type name.
nameB = null
Optional custom type name.
OverflowConversion
#Create the standard 'overflow conversion' exception. This ought to be thrown when the source value exceeds the range of the target type.
public static ConversionException OverflowConversion()
typeA,
Source data type for conversion.
typeB,
Target data type of conversion.
nameA = null,
Optional custom type name.
nameB = null
Optional custom type name.