[]
        
(Showing Draft Content)

C1.DataCollection.C1ConvertDataCollection-2

C1ConvertDataCollection<S, T> Class

Collection which allows converting the items through a select clause and cache the converted items.

Inheritance
C1ConvertDataCollection<S, T>
Namespace: C1.DataCollection
Assembly: C1.DataCollection.dll
Syntax
public class C1ConvertDataCollection<S, T> : C1WrapDataCollection<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<T>, ISupportEditing<T>, ISupportCreateNewItem<T>, ISupportPaging, ISupportSource where S : class? where T : class?
Public Class C1ConvertDataCollection(Of S As Class, T As Class)
    Inherits C1WrapDataCollection(Of T)
    Implements IDataCollection(Of T), IReadOnlyList(Of T), IReadOnlyCollection(Of T), IEnumerable(Of T), IEnumerable, INotifyCollectionChanged, ISupportIndexing(Of T), INotifyPropertyChanged, IDisposable, ISupportSorting, ISupportFiltering, ISupportGrouping, ISupportVirtualization, ISupportConnection, ISupportAsyncLoading(Of T), ISupportIncrementalLoading, ISupportRefreshing, ISupportRangeEditing(Of T), ISupportEditing(Of T), ISupportCreateNewItem(Of T), ISupportPaging, ISupportSource
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
C1ConvertDataCollection(IEnumerable)

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

C1ConvertDataCollection(IEnumerable, Func<IReadOnlyList<S>, int, T>, Func<T, S>?)

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

Properties

Name Description
Convert

Gets or sets the function that converts a source item into an item of this collection.

ConvertBack

Gets or sets the function that gets the source item from a converted item.

NotifySourceResetAsReplace

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

Source

Gets or sets the original source collection.

Methods

Name Description
Dispose(bool)

Called to dispose resources.

GetCachedItems(int?, int?)

Gets the cached items in the specified range.

OnCollectionChanging(object?, NotifyCollectionChangedEventArgs)

Occurs before the collection changes.

Events

Name Description
CollectionChanging

Occurs before the collection changes.

ItemLoaded

Occurs when an item is added to the cache.

ItemUnloaded

Occurs when an item is removed from the cache.

Extension Methods