New to Telerik UI for WinForms? Start a free 30-day trial

Chooses the resource-ID mapping strategy for a scheduler data-source collection.

Definition

Namespace:Telerik.WinControls.UI.Scheduler

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

C#
public class ResourceMapperFactory : IResourceMapperFactory

Inheritance: objectResourceMapperFactory

Implements: IResourceMapperFactory

Constructors

Initializes the factory with the data source whose resource provider supplies existing resource objects.

C#
public ResourceMapperFactory(SchedulerBindingDataSource ownerDataSource)
Parameters:ownerDataSourceSchedulerBindingDataSource

The scheduler binding data source that owns the resource provider.

Properties

Gets the scheduler data source associated with this factory.

C#
public SchedulerBindingDataSource OwnerDataSource { get; }

Methods

Selects a resource mapper based on the collection shape and resource-ID representation.

C#
public virtual ResourceIdMapper GetResourceMapper(object dataSourceItem, PropertyDescriptor resourceIdDescriptor)
Parameters:dataSourceItemobject

The collection holding the resource references for a data-source item.

resourceIdDescriptorPropertyDescriptor

The descriptor for the ID property on complex resource objects, or null when the collection contains resource-ID values directly; direct-ID collections must implement IList.

Returns:

ResourceIdMapper

The mapper selected for the collection, or null when a generic collection does not implement the required ICollection<T> interface.

Implements: IResourceMapperFactory.GetResourceMapper(object, PropertyDescriptor)

For complex resource objects, generic ICollection<T> collections can be mapped directly. When resourceIdDescriptor is null, the selected simple mapper uses IList; a generic collection that does not also implement IList is not usable for direct resource-ID values.