[]
        
(Showing Draft Content)

C1.DataCollection.C1HierarchicalDataCollection-1

C1HierarchicalDataCollection<T> Class

Base class of collections that are composed by others InternalCollections.

Inheritance
C1HierarchicalDataCollection<T>
Namespace: C1.DataCollection
Assembly: C1.DataCollection.dll
Syntax
public abstract class C1HierarchicalDataCollection<T> : IDataCollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, INotifyCollectionChanged, ISupportVirtualization, ISupportAsyncLoading<T>, ISupportIncrementalLoading, ISupportSorting, ISupportRangeEditing<T>, ISupportEditing<T>, ISupportIndexing<T>, IDisposable where T : class?
Type Parameters
Name Description
T

The type of the items in the collection.

Constructors

Name Description
C1HierarchicalDataCollection()

Properties

Name Description
Count

Gets the number of elements in the collection.

HasMoreItems

Gets a value that indicates whether more items can be loaded.

InternalCollections

Gets the collections that feed this collection.

IsDisposed

Gets whether the collection is disposed.

IsVirtualizing

Gets whether the collection is virtualizing its data.

this[int]

Gets the item at the specified index.

NotifySourceResetAsReplace

Gets or sets whether the Reset notifications coming from the source will be notified as a Replace.

SortDescriptions

Gets the sort descriptions applied to the data.

Methods

Name Description
CanInsert(int, T)

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

CanInsertRange(int, IEnumerable<T>)

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.

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, T)

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

CanReplaceRange(int, IEnumerable<T>)

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 sortDescriptions.

Dispose()
Dispose(bool)

Called to dispose resources.

GetEnumerator()

Returns an enumerator that iterates through the collection.

GetItemType()

Gets the type of the item.

GetLoadedItems()

Returns the items that has be loaded so far.

GetLoadedItems(int?, int?)

Returns all the items that has been loaded so far.

IndexOf(T)

Gets the index of an item in the collection, or -1 if the item is not found.

InsertAsync(int, T, CancellationToken)

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

InsertRangeAsync(int, IEnumerable<T>, 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.

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.

OnCollectionChanged(object?, NotifyCollectionChangedEventArgs)

Raises the CollectionChanged event.

OnInternalCollectionsChangedAsync(object?, NotifyCollectionChangedEventArgs)

Called when the InternalCollections changed.

OnSortChanged()

Called when sort changed.

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, T, CancellationToken)

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

ReplaceRangeAsync(int, IEnumerable<T>, CancellationToken)

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

SortAsync(params SortDescription[])

Sorts the collection according to the specified sortDescriptions.

SortAsync(SortDescription[], CancellationToken)

Sorts the collection according to the specified sortDescriptions.

Events

Name Description
CollectionChanged

Occurs when the collection changes.

SortChanged

Raised after a sort operation was performed.

Extension Methods