TypeRegister<P>
Provides a base class for registering and managing type conversions between source and target types.
Definition
Namespace:Telerik.Maui.Controls.Compatibility.Common
Assembly:Telerik.Maui.Controls.Compatibility.dll
Type Parameters:
P
The target platform type for conversions.
Syntax:
public abstract class TypeRegister<P>
Inheritance: objectTypeRegister<P>
Derived Classes:
Constructors
Initializes a new instance of the TypeRegister<P> class.
protected TypeRegister()
Methods
When overridden in a derived class, gets the platform-specific representation of the object.
protected abstract P GetNativeObjectCore(object value)
The object to convert.
Returns:P
The platform-specific representation.
When overridden in a derived class, gets the object representation from the platform-specific value.
Registers a type converter for the specified source and target types.
public static void Register(Type sourceType, Type targetType, ITypeConverter<P> converter)
The source type to convert from.
targetTypeTypeThe target type to convert to.
converterITypeConverter<P>The type converter to use for the conversion.
Registers a type converter for the specified generic source and target types.
public static void Register<O, N>() where N : P