Table of Contents

Class ObservableCollectionExtended<T>

Namespace
DynamicData.Binding
Assembly
DynamicData.dll

An override of observable collection which allows the suspension of notifications.

public class ObservableCollectionExtended<T> : ObservableCollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IObservableCollection<T>, INotifyCollectionChanged, INotifyPropertyChanged, INotifyCollectionChangedSuspender, IExtendedList<T>, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable

Type Parameters

T

The type of the item.

Inheritance
ObservableCollectionExtended<T>
Implements
Inherited Members
Extension Methods
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)

Constructors

ObservableCollectionExtended()

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

public ObservableCollectionExtended()

ObservableCollectionExtended(IEnumerable<T>)

Initializes a new instance of the ObservableCollectionExtended<T> class that contains elements copied from the specified collection.

public ObservableCollectionExtended(IEnumerable<T> collection)

Parameters

collection IEnumerable<T>

The collection from which the elements are copied.

Exceptions

ArgumentNullException

The collection parameter cannot be null.

ObservableCollectionExtended(List<T>)

Initializes a new instance of the ObservableCollectionExtended<T> class that contains elements copied from the specified list.

public ObservableCollectionExtended(List<T> list)

Parameters

list List<T>

The list from which the elements are copied.

Exceptions

ArgumentNullException

The list parameter cannot be null.

Methods

AddRange(IEnumerable<T>)

Adds the elements of the specified collection to the end of the collection.

public void AddRange(IEnumerable<T> collection)

Parameters

collection IEnumerable<T>

The collection whose elements should be added to the end of the List. The collection itself cannot be null, but it can contain elements that are null.

Exceptions

ArgumentNullException

collection is null.

InsertRange(IEnumerable<T>, int)

Inserts the elements of a collection into the ObservableCollectionExtended<T> at the specified index.

public void InsertRange(IEnumerable<T> collection, int index)

Parameters

collection IEnumerable<T>

Inserts the items at the specified index.

index int

The zero-based index at which the new elements should be inserted.

Exceptions

ArgumentNullException

collection is null.

ArgumentOutOfRangeException

index is less than 0.-or-index is greater than Count.

Load(IEnumerable<T>)

Clears the list and Loads the specified items.

public void Load(IEnumerable<T> items)

Parameters

items IEnumerable<T>

The items.

OnCollectionChanged(NotifyCollectionChangedEventArgs)

Raises the CollectionChanged event.

protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)

Parameters

e NotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing the event data.

OnPropertyChanged(PropertyChangedEventArgs)

Raises the PropertyChanged event.

protected override void OnPropertyChanged(PropertyChangedEventArgs e)

Parameters

e PropertyChangedEventArgs

The PropertyChangedEventArgs instance containing the event data.

RemoveRange(int, int)

Removes a range of elements from the ObservableCollectionExtended<T>.

public void RemoveRange(int index, int count)

Parameters

index int

The zero-based starting index of the range of elements to remove.

count int

The number of elements to remove.

Exceptions

ArgumentOutOfRangeException

index is less than 0.-or-count is less than 0.

ArgumentException

index and count do not denote a valid range of elements in the List<T>.

SuspendCount()

Suspends count notifications.

public IDisposable SuspendCount()

Returns

IDisposable

A disposable when disposed will reset the count.

SuspendNotifications()

Suspends notifications. When disposed, a reset notification is fired.

public IDisposable SuspendNotifications()

Returns

IDisposable

A disposable when disposed will reset notifications.