Table of Contents

Class ObjectDataProvider

Namespace
combit.Reporting.DataProviders
Assembly
combit.ListLabel31.CrossPlatform.dll

Provides a data provider implementation that uses reflection to parse collections of business objects into tables and relations.

public sealed class ObjectDataProvider : IDataProvider, ICanHandleUsedIdentifiers, ISupportsLogger
Inheritance
ObjectDataProvider
Implements
Inherited Members

Remarks

The ObjectDataProvider class implements IDataProvider, ICanHandleUsedIdentifiers, and ISupportsLogger. It inspects the structure of the supplied business objects at runtime and exposes their properties as data tables for reporting and data binding scenarios.

Constructors

ObjectDataProvider(object)

Initializes a new instance of the ObjectDataProvider class using the specified data source. The default maximum recursion depth is set to 3.

public ObjectDataProvider(object source)

Parameters

source object

The business object or collection of business objects to be parsed as a data source.

ObjectDataProvider(object, int)

Initializes a new instance of the ObjectDataProvider class using the specified data source and maximum recursion depth.

public ObjectDataProvider(object source, int maximumRecursionDepth)

Parameters

source object

The business object or collection of business objects to be parsed as a data source.

maximumRecursionDepth int

The maximum recursion depth for parsing nested properties.

Properties

FlattenStructure

Gets or sets a value indicating whether the structure of the data source should be flattened. When set to true, nested properties are merged into a single table structure if possible.

public bool FlattenStructure { get; set; }

Property Value

bool

MaximumRecursionDepth

Gets or sets the maximum recursion depth when parsing the data source structure. This value determines how deep the provider will inspect nested objects.

public int MaximumRecursionDepth { get; set; }

Property Value

int

ObjectForStructureParsing

Gets or sets an alternative object used for structure parsing. This property can be used to override the default reflection-based parsing behavior.

public object ObjectForStructureParsing { get; set; }

Property Value

object

RootTableName

Gets or sets the name of the root table derived from the data source. This property is determined via reflection based on the type of the source object.

public string RootTableName { get; set; }

Property Value

string

Source

Gets the original data source object that is being parsed into a table structure.

public object Source { get; }

Property Value

object

UseLinqForSorting

Allows to switch between LINQ based sorting (default) and sorting via IBindingListView

public bool UseLinqForSorting { get; set; }

Property Value

bool

Events

HandleEnumerableProperty

Occurs before processing an enumerable property in the object data provider. This event allows subscribers to control or cancel the recursion for enumerable properties.

public event EventHandler<HandleEnumerablePropertyEventArgs> HandleEnumerableProperty

Event Type

EventHandler<HandleEnumerablePropertyEventArgs>

HandleFlattenedProperty

Occurs before processing a flattened property in the object data provider. This event enables subscribers to modify the processing or cancel the recursion for flattened properties.

public event EventHandler<HandleFlattenedPropertyEventArgs> HandleFlattenedProperty

Event Type

EventHandler<HandleFlattenedPropertyEventArgs>

LoadDeferredContent

Occurs when deferred content needs to be loaded. Subscribers to this event should handle the loading of content from the specified source and property.

public event EventHandler<LoadDeferredContentEventArgs> LoadDeferredContent

Event Type

EventHandler<LoadDeferredContentEventArgs>