Skip to main content

Motion Standalone Postprocessor C# library 2024 R2

Class ObservableHashSet

Last update: 03.07.2024

Namespace: VM.Collections
Assembly: VM.dll

Represents an observable set of values.

public sealed class ObservableHashSet<T> : HashSet<T>

Type Parameters

T

The type of elements in the hash set.

Inheritance

objectHashSet<T>ObservableHashSet<T>

Constructors

ObservableHashSet()

public ObservableHashSet()

ObservableHashSet(IEnumerable<T>)

public ObservableHashSet(IEnumerable<T> collection)

Parameters

collection IEnumerable<T>

ObservableHashSet(IEqualityComparer<T>)

public ObservableHashSet(IEqualityComparer<T> comparer)

Parameters

comparer IEqualityComparer<T>

ObservableHashSet(IEnumerable<T>, IEqualityComparer<T>)

public ObservableHashSet(IEnumerable<T> collection, IEqualityComparer<T> comparer)

Parameters

collection IEnumerable<T>

comparer IEqualityComparer<T>

Methods

Add(T)

Adds the specified element to a set.

public bool Add(T item)

Parameters

item T

The element to add to the set.

Returns

bool

true if the element is added to the object; false if the element is already present.

Clear()

Removes all elements from a object.

public void Clear()

Dispose()

public void Dispose()

ExceptWith(IEnumerable<T>)

Removes all elements in the specified collection from the current object.

public void ExceptWith(IEnumerable<T> other)

Parameters

other IEnumerable<T>

The collection of items to remove from the object.

IntersectWith(IEnumerable<T>)

Modifies the current object to contain only elements that are present in that object and in the specified collection.

public void IntersectWith(IEnumerable<T> other)

Parameters

other IEnumerable<T>

The collection to compare to the current object.

Remove(T)

Removes the specified element from a object.

public bool Remove(T item)

Parameters

item T

The element to remove.

Returns

bool

true if the element is successfully found and removed; otherwise, false. This method returns false if item is not found in the object.

Reset()

public void Reset()

SymmetricExceptWith(IEnumerable<T>)

Modifies the current object to contain only elements that are present either in that object or in the specified collection, but not both.

public void SymmetricExceptWith(IEnumerable<T> other)

Parameters

other IEnumerable<T>

The collection to compare to the current object.

UnionWith(IEnumerable<T>)

Modifies the current object to contain all elements that are present in itself, the specified collection, or both.

public void UnionWith(IEnumerable<T> other)

Parameters

other IEnumerable<T>

The collection to compare to the current object.

CollectionChanged

public event NotifyCollectionChangedEventHandler CollectionChanged

Event Type

NotifyCollectionChangedEventHandler