Share via


ReadOnlyObservableSet<T> Class

Provides the base class for a generic IReadOnlyObservableSet<T>.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Shell.ReadOnlyObservableSet<T>

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)

Syntax

'Declaration
Public MustInherit Class ReadOnlyObservableSet(Of T) _
    Implements IReadOnlyObservableSet(Of T), IReadOnlyObservableSet, INotifyCollectionChanged,  _
    IEnumerable(Of T), IEnumerable
public abstract class ReadOnlyObservableSet<T> : IReadOnlyObservableSet<T>, 
    IReadOnlyObservableSet, INotifyCollectionChanged, IEnumerable<T>, IEnumerable
generic<typename T>
public ref class ReadOnlyObservableSet abstract : IReadOnlyObservableSet<T>, 
    IReadOnlyObservableSet, INotifyCollectionChanged, IEnumerable<T>, IEnumerable
[<AbstractClass>]
type ReadOnlyObservableSet<'T> =  
    class 
        interface IReadOnlyObservableSet<'T>
        interface IReadOnlyObservableSet 
        interface INotifyCollectionChanged 
        interface IEnumerable<'T>
        interface IEnumerable 
    end
JScript does not support generic types or methods.

Type Parameters

  • T
    The type of items stored in the set.

The ReadOnlyObservableSet<T> type exposes the following members.

Constructors

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

Top

Properties

  Name Description
Public property Count Gets the number of elements actually contained in the ReadOnlyObservableSet<T>.

Top

Methods

  Name Description
Protected method AddItem Adds the specified element to a set.
Protected method ClearItems Removes all elements from a ReadOnlyObservableSet<T> object.
Public method Contains(Object) Determines whether an element is in the ReadOnlyObservableSet<T>.
Public method Contains(T) Determines whether an element is in the ReadOnlyObservableSet<T>.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetEnumerator Returns an enumerator that iterates through the ReadOnlyObservableSet<T>.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnCollectionChanged Invoked when the collection is changed.
Protected method OnItemAdded Invoked when an element is added to the set.
Protected method OnItemRemoved Invoked when an element is removed from the set.
Protected method OnItemsCleared Invoked when the set is cleared.
Protected method RemoveItem Removes the specified element from a ReadOnlyObservableSet<T> object.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event CollectionChanged Occurs when an item is added, removed, changed, moved, or the entire set is refreshed.

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator Returns an enumerator that iterates through the ReadOnlyObservableSet<T>.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Shell Namespace