ClassTypeRegister<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
TypeRegister()
Initializes a new instance of the TypeRegister<P> class.
Declaration
protected TypeRegister()
Methods
GetNativeObjectCore(object)
When overridden in a derived class, gets the platform-specific representation of the object.
Declaration
protected abstract P GetNativeObjectCore(object value)
Parameters
value
The object to convert.
Returns
P
The platform-specific representation.
GetNativeTypeCore(Type)
When overridden in a derived class, gets the platform-specific type for the specified type.
GetObjectCore(P, Type, object)
When overridden in a derived class, gets the object representation from the platform-specific value.
GetTypeConverter(Type, Type)
When overridden in a derived class, gets a type converter for the specified types.
Declaration
protected abstract ITypeConverter<P> GetTypeConverter(Type type, Type nativeType)
Parameters
type
The source type.
nativeType
The target native type.
Returns
A type converter for the specified types.
Register(Type, Type, ITypeConverter<P>)
Registers a type converter for the specified source and target types.
Declaration
public static void Register(Type sourceType, Type targetType, ITypeConverter<P> converter)
Parameters
sourceType
The source type to convert from.
targetType
The target type to convert to.
converter
The type converter to use for the conversion.
Register<O, N>()
Registers a type converter for the specified generic source and target types.
Declaration
public static void Register<O, N>() where N : P