[]
        
(Showing Draft Content)

C1.DataCollection.C1DataCollectionList-1

C1DataCollectionList<T> Class

Data collection wrapper for exposing it as a IList<T>.

Namespace: C1.DataCollection
Assembly: C1.DataCollection.dll
Syntax
public class C1DataCollectionList<T> : IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, INotifyCollectionChanged where T : class?
Type Parameters
Name Description
T

Constructors

Name Description
C1DataCollectionList(IDataCollection<T>?)

Initializes a new instance of the C1DataCollectionList<T> class.

Properties

Name Description
Count

Gets the number of elements contained in the ICollection.

DataCollection

Gets the data collection this list is wrapping.

IsFixedSize

Gets whether the collection size can change.

IsReadOnly

Gets or sets a value indicating whether the ICollection<T> is read-only.

IsSynchronized

Gets a value indicating whether access to the ICollection is synchronized (thread safe).

this[int]

Gets or sets the element at the specified index.

SyncRoot

Gets an object that can be used to synchronize access to the ICollection.

Methods

Name Description
Add(T)

Adds an item to the ICollection<T>.

AddRange(IEnumerable<T>)

Adds a range of items.

Clear()

Removes all items from the ICollection<T>.

Contains(object?)

Determines whether the IList contains a specific value.

Contains(T)

Determines whether the ICollection<T> contains a specific value.

CopyTo(Array, int)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

CopyTo(T[], int)

Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

GetEnumerator()

Returns an enumerator that iterates through a collection.

IndexOf(object?)

Determines the index of a specific item in the IList.

IndexOf(T)

Determines the index of a specific item in the IList<T>.

Insert(int, object?)

Inserts an item to the IList at the specified index.

Insert(int, T)

Inserts an item to the IList<T> at the specified index.

InsertRange(int, IEnumerable<T>)

Inserts a range of items in the collection.

Move(int, int)

Moves the item at the from position to to.

OnCollectionChanged(NotifyCollectionChangedEventArgs)

Raises the CollectionChanged event.

Remove(object?)

Removes the first occurrence of a specific object from the IList.

Remove(T)

Removes the first occurrence of a specific object from the ICollection<T>.

RemoveAt(int)

Removes the IList<T> item at the specified index.

RemoveRange(int, int)

Removes a range of items.

ReplaceRange(int, IEnumerable<T>)

Replaces a range of items.

SetSource(IDataCollection<T>?)

Sets the data collection that this list wraps.

Events

Name Description
CollectionChanged

Occurs after the items in the collection changed.

Extension Methods