ListBindingHelper

Wisej.Web.ListBindingHelper

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.0.0.0)

Provides functionality to discover a bindable list and the properties of the items contained in the list when they differ from the public properties of the object to which they bind.

public class ListBindingHelper

Methods

GetList(list)

Returns a list associated with the specified data source.

Parameter
Type
Description

list

The data source to examine for its underlying list.

Returns: Objectarrow-up-right. An Objectarrow-up-right representing the underlying list if it exists; otherwise, the original data source specified by list .

GetList(dataSource, dataMember)

Returns an object, typically a list, from the evaluation of a specified data source and optional data member.

Parameter
Type
Description

dataSource

The data source from which to find the list.

dataMember

The name of the data source property that contains the list. This can be null.

Returns: Objectarrow-up-right. An Objectarrow-up-right representing the underlying list if it was found; otherwise, dataSource .

Throws:

GetListItemProperties(list)

Returns the PropertyDescriptorCollectionarrow-up-right that describes the properties of an item type contained in a specified data source, or properties of the specified data source.

Parameter
Type
Description

list

The data source to examine for property information.

Returns: PropertyDescriptorCollectionarrow-up-right. The PropertyDescriptorCollectionarrow-up-right containing the properties of the items contained in list , or properties of list..

GetListItemProperties(list, listAccessors)

Returns the PropertyDescriptorCollectionarrow-up-right that describes the properties of an item type contained in a collection property of a data source. Uses the specified PropertyDescriptorarrow-up-right array to indicate which properties to examine.

Parameter
Type
Description

list

The data source to be examined for property information.

listAccessors

The PropertyDescriptorarrow-up-right array describing which properties of the data source to examine. This can be null.

Returns: PropertyDescriptorCollectionarrow-up-right. The PropertyDescriptorCollectionarrow-up-right describing the properties of the item type contained in a collection property of the data source.

GetListItemProperties(dataSource, dataMember, listAccessors)

Returns the PropertyDescriptorCollectionarrow-up-right that describes the properties of an item type contained in the specified data member of a data source. Uses the specified PropertyDescriptorarrow-up-right array to indicate which properties to examine.

Parameter
Type
Description

dataSource

The data source to be examined for property information.

dataMember

The optional data member to be examined for property information. This can be null.

listAccessors

The PropertyDescriptorarrow-up-right array describing which properties of the data member to examine. This can be null.

Returns: PropertyDescriptorCollectionarrow-up-right. The PropertyDescriptorCollectionarrow-up-right describing the properties of an item type contained in a collection property of the specified data source.

Throws:

GetListItemType(list)

Returns the data type of the items in the specified list.

Parameter
Type
Description

list

The list to be examined for type information.

Returns: Typearrow-up-right. The Typearrow-up-right of the items contained in the list.

GetListItemType(dataSource, dataMember)

Returns the data type of the items in the specified data source.

Parameter
Type
Description

dataSource

The data source to examine for items.

dataMember

The optional name of the property on the data source that is to be used as the data member. This can be null.

Returns: Typearrow-up-right. For complex data binding, the Typearrow-up-right of the items represented by the dataMember in the data source; otherwise, the Typearrow-up-right of the item in the list itself.

GetListName(list, listAccessors)

Returns the name of an underlying list, given a data source and optional PropertyDescriptorarrow-up-right array.

Parameter
Type
Description

list

The data source to examine for the list name.

listAccessors

An array of PropertyDescriptorarrow-up-right objects to find in the data source. This can be null.

Returns: Stringarrow-up-right. The name of the list in the data source, as described by listAccessors , or the name of the data source type.

Last updated

Was this helpful?