Table of Contents

Class HSObservableCollection<T>

Namespace
SearchAThing.Ext
Assembly
netcore-ext.dll

ObservableCollection backed with hashset for the Contains test.

public class HSObservableCollection<T> : ObservableCollection<T>, IList<T>, ICollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged

Type Parameters

T
ObservableCollection backed with hashset for the Contains test.
Inheritance
HSObservableCollection<T>
Implements
Inherited Members
Extension Methods

Remarks

Normal behavior of obc still the same, ie. add the same object two times will result in obc increase in size with two references to the same object, and in the same way removing doesn't invalidate the presence until last occurrence of contains tested object will be removed.

Constructors

HSObservableCollection()

public HSObservableCollection()

HSObservableCollection(IEnumerable<T>)

public HSObservableCollection(IEnumerable<T> items)

Parameters

items IEnumerable<T>

Methods

ClearItems()

protected override void ClearItems()

Contains(T)

public bool Contains(T item)

Parameters

item T

Returns

bool

InsertItem(int, T)

protected override void InsertItem(int index, T item)

Parameters

index int
item T

RemoveItem(int)

protected override void RemoveItem(int index)

Parameters

index int

SetItem(int, T)

protected override void SetItem(int index, T item)

Parameters

index int
item T