[]
Base class for data-virtualized collections.
public abstract class C1VirtualDataCollection<T> : C1DataCollectionBase<T?>, IDataCollection<T?>, IReadOnlyList<T?>, IReadOnlyCollection<T?>, IEnumerable<T?>, IEnumerable, INotifyCollectionChanged, ISupportIndexing<T?>, INotifyPropertyChanged, IDisposable, ISupportVirtualization, ISupportRefreshing, ISupportConnection, ISupportAsyncLoading<T>, ISupportSorting, ISupportFiltering, ISupportEditing<T> where T : class?
Name | Description |
---|---|
T |
Override GetPageAsync to provide the data.
Name | Description |
---|---|
C1VirtualDataCollection(int, int, TimeSpan?) | Initializes a new instance of the C1VirtualDataCollection<T> class. |
Name | Description |
---|---|
ConnectionState | Gets the state of the connection to the source. |
Count | Gets the number of elements in the collection. |
FilterExpression | Gets the filter expression applied to the data. |
InternalList | Gets or sets the list that hold the items to be returned in the public api. |
IsLoading | Gets whether the collection is getting the data. |
IsVirtualizing | Gets whether the collection is virtualizing its data. |
this[int] | Gets the element at the specified index in the read-only list. |
Mode | Gets or sets the way the items will be loaded |
PageSize | Gets or sets the number of items that will be fetch per page. |
SortDescriptions | Gets the sort descriptions applied to the data. |
Name | Description |
---|---|
CanFilter(FilterExpression?) | Returns whether the collection is able to filter the specified |
CanInsert(int, T) | Determines whether a new item can be inserted in the collection at the specified |
CanMove(int, int) | Determines whether the item at |
CanRefresh() | Determines whether the collection can be refreshed. |
CanRemove(int) | Determines whether the item at the specified |
CanReplace(int, T) | Determines whether the item at the specified |
CanSort(params SortDescription[]) | Returns whether the collection is able to sort the specified |
ConnectAsync(CancellationToken) | Connects the collection to the source. |
ConnectAsyncOverride(CancellationToken) | When overridden, this method is used to initialize the collection. |
DisconnectAsync(CancellationToken) | Invokes the finalization of the collection. |
DisconnectAsyncOverride(CancellationToken) | When overridden, this method is used to finalize the collection. |
FilterAsync(FilterExpression?, CancellationToken) | Filters the data using specified |
GetLoadedItems() | Returns the items that has be loaded so far. |
GetLoadedItems(int?, int?) | Returns all the items that has be loaded so far. |
GetPageAsync(int, int, int, IReadOnlyList<SortDescription>?, FilterExpression?, CancellationToken) | When overridden in an inherited class it returns the items in the page as well as a token to the next page. |
IndexOf(T?) | Gets the index of the specified item. |
InsertAsync(int, T, CancellationToken) | Inserts the specified |
InsertAsyncOverride(int, T, CancellationToken) | This method is called when an item is inserted in the collection. |
LoadAsync(int?, int?, CancellationToken) | Loads all the items between the specified range. |
MoveAsync(int, int, CancellationToken) | Moves an item from the specified |
MoveAsyncOverride(int, int, CancellationToken) | This method is called when an item is moved in the collection. |
OnFilterChanged() | Called after the filter changed. |
OnResetting() | Called before the cache is reset. |
OnSortChanged() | Called after the sort changed. |
RefreshAsync(CancellationToken) | Removes the cached data and loads the whole collection from scratch. |
RemoveAsync(int, CancellationToken) | Removes the item at the specified |
RemoveAsyncOverride(int, CancellationToken) | This method is called when an item is removed from the collection. |
ReplaceAsync(int, T, CancellationToken) | Replaces the item at the specified |
ReplaceAsyncOverride(int, T, CancellationToken) | This method is called when an item is replaced in the collection. |
ResetCache(int) | Resets the internal cache. |
SortAsync(params SortDescription[]) | Sorts the collection according to the specified sort descriptions. |
SortAsync(SortDescription[], CancellationToken) | Sorts the collection according to the specified sort descriptions. |
Name | Description |
---|---|
FilterChanged | Raised after a filter operation was performed. |
SortChanged | Raised after a sort operation was performed. |