[]
        
(Showing Draft Content)

C1.DataCollection.C1WrapDataCollection-2

C1WrapDataCollection<S, T> Class

Collection which takes another collection as source.

Namespace: C1.DataCollection
Assembly: C1.DataCollection.dll
Syntax
public abstract class C1WrapDataCollection<S, T> : C1DataCollectionBase<T>, IDataCollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, INotifyCollectionChanged, ISupportIndexing<T>, INotifyPropertyChanged, IDisposable, ISupportSorting, ISupportFiltering, ISupportGrouping, ISupportVirtualization, ISupportConnection, ISupportAsyncLoading<T>, ISupportIncrementalLoading, ISupportRefreshing, ISupportRangeEditing<S>, ISupportEditing<S>, ISupportCreateNewItem<S>, ISupportPaging, ISupportSource where S : class? where T : class?
Type Parameters
Name Description
S

The type of the items in the source collection.

T

The type of the items in the collection.

Constructors

Name Description
C1WrapDataCollection()

Initializes a new instance of the C1WrapDataCollection<S, T> class.

C1WrapDataCollection(IEnumerable)

Initializes a new instance of the C1WrapDataCollection<S, T> class.

Properties

Name Description
ConnectionState

Gets the state of the connection to the source.

CurrentPage

Gets the current page number.

FilterExpression

Gets the filter expression applied to the data.

GroupDescriptions

Gets the group descriptions applied to the data.

HasMoreItems

Gets a value indicating whether this collection can load more items.

IsPlain

Gets whether the group items will be inline with the data items or the items will be the first level of group items.

IsUpdating

Gets a value indicating whether the collection is being updated.

IsVirtualizing

Gets whether the collection is virtualizing its data.

PageSize

Gets or sets the maximum number of items per page.

SortDescriptions

Gets the sort descriptions applied to the data.

Source

Gets or sets the original source collection.

SourceIsDataCollectionList

Gets a value indicating whether the source collection is an C1DataCollectionList<T>.

SourceIsGeneric

Gets a value indicating whether the source collection is a list.

SourceIsList

Gets a value indicating whether the source collection is a list.

SourceIsObservableCollection

Gets a value indicating whether the source collection is an ObservableCollection<T>.

SourceNotifiesChanges

Gets a value indicating whether the source collection notifies changes.

TotalCount

Gets the total number of items in the collection.

Methods

Name Description
CanFilter(FilterExpression?)

Returns whether the collection is able to filter the specified expression.

CanGroup(params GroupDescription[])

Returns whether the collection is able to group the specified group descriptions.

CanInsert(int, S)

Determines whether a new item can be inserted in the collection at the specified index.

CanInsertRange(int, IEnumerable<S>)

Determines whether a new range of items can be inserted in the collection at the specified startingIndex.

CanMove(int, int)

Determines whether the item at fromIndex can be moved to toIndex.

CanMoveRange(int, int, int)

Determines whether the item at fromIndex can be moved to toIndex.

CanRefresh()

Determines whether the collection can be refreshed.

CanRemove(int)

Determines whether the item at the specified index can be removed from the collection.

CanRemoveRange(int, int)

Determines whether a range of items at the specified startingIndex can be removed from the collection.

CanReplace(int, S)

Determines whether the item at the specified index can be replaced in the collection.

CanReplaceRange(int, IEnumerable<S>)

Determines whether the items starting at the specified startingIndex can be replaced in the collection.

CanSort(params SortDescription[])

Returns whether the collection is able to sort the specified sort descriptions.

ConnectAsync(CancellationToken)

Connects the collection to the source.

CreateInternalList(IReadOnlyList<S>)

Creates the internal list from the source.

CreateNewItem()

Creates a new item of the collection.

DisconnectAsync(CancellationToken)

Disconnects the collection from the source.

Dispose(bool)

Called to dispose resources.

FilterAsync(FilterExpression?, CancellationToken)

Filters the data using specified filter expression.

GetLoadedItems()

Returns the items that has be loaded so far.

GetLoadedItems(int?, int?)

Returns the items that has be loaded so far.

GroupAsync(params GroupDescription[])

Groups the collection according to the specified group descriptions.

GroupAsync(GroupDescription[], CancellationToken)

Groups the collection according to the specified group descriptions.

InsertAsync(int, S, CancellationToken)

Inserts the specified item at the specified index in the collection.

InsertRangeAsync(int, IEnumerable<S>, CancellationToken)

Inserts the specified items at the specified startingIndex in the collection.

LoadAsync(int?, int?, CancellationToken)

Load the items between the specified indexes.

LoadMoreItemsAsync(int?, CancellationToken)

Loads more items asynchronously.

MoveAsync(int, int, CancellationToken)

Moves an item from the specified fromIndex to toIndex.

MoveRangeAsync(int, int, int, CancellationToken)

Moves the items starting at the specified fromIndex to toIndex.

MoveToPageAsync(int, CancellationToken)

Moves to the page pageIndex.

OnFilterChanged()

Called after the filter changed.

OnGroupChanged()

Called after the groups changed.

OnPageChanged()

Raises the PageChanged event.

OnSortChanged()

Called after the sort changed.

OnSourceCollectionChanged(object?, NotifyCollectionChangedEventArgs)

Called when the source collection changed.

RefreshAsync(CancellationToken)

Refreshes the collection data.

RemoveAsync(int, CancellationToken)

Removes the item at the specified index from the collection.

RemoveRangeAsync(int, int, CancellationToken)

Removes the items at the specified startingIndex from the collection.

ReplaceAsync(int, S, CancellationToken)

Replaces the item at the specified index by the specified item.

ReplaceRangeAsync(int, IEnumerable<S>, CancellationToken)

Replaces the items starting at the specified startingIndex by the specified items.

SortAsync(params SortDescription[])

Sorts the collection according to the specified sort descriptions.

SortAsync(SortDescription[], CancellationToken)

Sorts the collection according to the specified sort descriptions.

SuppressSourceNotifications()

Disables the notifications while the returned IDisposable is not disposed.

Events

Name Description
FilterChanged

Raised after a filter operation was performed.

GroupChanged

Raised after a grouping operation was performed.

PageChanged

Occurs after the current page changed.

SortChanged

Raised after a sort operation was performed.

Extension Methods