[]
Base class for cursor-like collection.
public abstract class C1CursorDataCollection<T, K> : C1DataCollectionBase<T>, IDataCollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, INotifyCollectionChanged, ISupportIndexing<T>, INotifyPropertyChanged, IDisposable, ISupportVirtualization, ISupportConnection, ISupportIncrementalLoading, ISupportRefreshing, ISupportSorting, ISupportFiltering, ISupportEditing<T> where T : class?
| Name | Description |
|---|---|
| T | The type of the items in the collection. |
| K | The type of the token. |
This class is appropriate for wrapping data services that return the data in pages and give a token to get the next page, like Facebook, Twitter, YouTube, etc.
| Name | Description |
|---|---|
| C1CursorDataCollection() |
| Name | Description |
|---|---|
| ConnectionState | Gets the state of the connection to the source. |
| FilterExpression | Gets the filter expression applied to the data. |
| HasMoreItems | Gets a value that indicates whether more items can be loaded. |
| InternalList | Gets or sets the list that hold the items to be returned in the public api. |
| IsVirtualizing | Gets whether the collection is virtualizing its data. |
| 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) | Disconnects the collection from the source. |
| DisconnectAsyncOverride(CancellationToken) | When overridden, this method is used to finalize the collection. |
| FilterAsync(FilterExpression?, CancellationToken) | Filters the data using specified |
| GetPageAsync(int, K?, 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. |
| InsertAsync(int, T, CancellationToken) | Inserts the specified |
| InsertAsyncOverride(int, T, CancellationToken) | This method is called when an item is inserted in the collection. |
| LoadMoreItemsAsync(int?, CancellationToken) | Loads more items. |
| 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. |
| 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. |
| 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. |