[]
        
(Showing Draft Content)

C1.DataCollection.C1SelectDataCollection-2

C1SelectDataCollection<S, T> Class

Collection which allows transforming the items through a select clause.

Inheritance
C1SelectDataCollection<S, T>
Namespace: C1.DataCollection
Assembly: C1.DataCollection.dll
Syntax
public class C1SelectDataCollection<S, T> : C1WrapDataCollection<S, 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, ISupportRangeEditing<T>, ISupportEditing<T> 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
C1SelectDataCollection(IEnumerable)

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

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

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

C1SelectDataCollection(IEnumerable, Func<int, S, T>)

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

Properties

Name Description
Count

Gets the number of elements in the collection.

this[int]

Gets the element at the specified index in the read-only list.

Select

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

SelectBack

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

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.

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.

CreateInternalList(IReadOnlyList<S>)

Creates the internal list from the source.

IndexOf(T)

Gets the index of the specified item.

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.

OnSourceCollectionChanged(object?, NotifyCollectionChangedEventArgs)

Called when the source collection changed.

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.

Extension Methods