Class
TypeMappings

Provides type mapping functionality for managing adapters and instance mappings between source and target objects.

Definition

Namespace:Telerik.Maui.Controls.Compatibility.Common

Assembly:Telerik.Maui.Controls.Compatibility.dll

Syntax:

cs-api-definition
public class TypeMappings

Inheritance: objectTypeMappings

Constructors

TypeMappings()

Initializes a new instance of the TypeMappings class.

Declaration

cs-api-definition
protected TypeMappings()

Methods

CreateInstance(object, object)

Creates an instance of the target type based on the source item and updates the mapping.

Declaration

cs-api-definition
public static object CreateInstance(object sourceItem, object parameter = null)

Parameters

sourceItem

object

The source item to create an instance for.

parameter

object

Optional parameter for instance creation.

Returns

object

The created instance.

DisposeTargetInstance(object)

Disposes the target instance associated with the specified source instance.

Declaration

cs-api-definition
public static void DisposeTargetInstance(object sourceInstance)

Parameters

sourceInstance

object

The source instance whose target should be disposed.

GetAdapter(object)

Gets the adapter associated with the specified source instance.

Declaration

cs-api-definition
public static object GetAdapter(object sourceInstance)

Parameters

sourceInstance

object

The source instance to get the adapter for.

Returns

object

The adapter instance.

GetEventArgs(Type, object)

Gets the event arguments converted to the specified target type.

Declaration

cs-api-definition
public static object GetEventArgs(Type targetType, object args)

Parameters

targetType

Type

The target type for the event arguments.

args

object

The source event arguments.

Returns

object

The converted event arguments.

GetTargetInstance(object)

Gets the target instance associated with the specified source instance.

Declaration

cs-api-definition
public static object GetTargetInstance(object sourceInstance)

Parameters

sourceInstance

object

The source instance to get the target for.

Returns

object

The target instance.

UpdateInstance(object, object)

Updates the instance mapping between the source and target items.

Declaration

cs-api-definition
public static void UpdateInstance(object sourceItem, object targetItem)

Parameters

sourceItem

object

The source item.

targetItem

object

The target item.