ReadOnlyObservableSet<T> Class

Definition

Provides the base class for a generic IReadOnlyObservableSet.

generic <typename T>
public ref class ReadOnlyObservableSet abstract : Microsoft::VisualStudio::Shell::IReadOnlyObservableSet<T>, System::Collections::Generic::IEnumerable<T>, System::Collections::Specialized::INotifyCollectionChanged
public abstract class ReadOnlyObservableSet<T> : Microsoft.VisualStudio.Shell.IReadOnlyObservableSet<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Specialized.INotifyCollectionChanged
type ReadOnlyObservableSet<'T> = class
    interface IReadOnlyObservableSet<'T>
    interface IReadOnlyObservableSet
    interface IEnumerable
    interface INotifyCollectionChanged
    interface seq<'T>
Public MustInherit Class ReadOnlyObservableSet(Of T)
Implements IEnumerable(Of T), INotifyCollectionChanged, IReadOnlyObservableSet(Of T)

Type Parameters

T

The type of items stored in the set.

Inheritance
ReadOnlyObservableSet<T>
Implements

Constructors

ReadOnlyObservableSet<T>(IEqualityComparer<T>)

Initializes a new instance of the ReadOnlyObservableSet<T> class that is empty and uses the specified equality comparer for the set type..

Properties

Count

Gets the number of elements actually contained in the ReadOnlyObservableSet<T>.

Methods

AddItem(T)

Adds the specified element to a set.

ClearItems()

Removes all elements from a ReadOnlyObservableSet<T> object.

Contains(Object)

Determines whether an element is in the ReadOnlyObservableSet<T>.

Contains(T)

Determines whether an element is in the ReadOnlyObservableSet<T>.

GetEnumerator()

Returns an enumerator that iterates through the ReadOnlyObservableSet<T>.

OnCollectionChanged(NotifyCollectionChangedEventArgs)

Invoked when the collection is changed.

OnItemAdded(T)

Invoked when an element is added to the set.

OnItemRemoved(T)

Invoked when an element is removed from the set.

OnItemsCleared(IEnumerable<T>)

Invoked when the set is cleared.

RemoveItem(T)

Removes the specified element from a ReadOnlyObservableSet<T> object.

Events

CollectionChanged

Occurs when an item is added, removed, changed, moved, or the entire set is refreshed.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through the ReadOnlyObservableSet<T>.

Extension Methods

EmptyIfNull<T>(IEnumerable<T>)

Applies to