EventSinkCollection Class

Maps objects to and from event "cookies" that represent a client's registration with an event provider.

This API is not CLS-compliant. 

Inheritance Hierarchy


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


<CLSCompliantAttribute(False)> _
Public Class EventSinkCollection _
    Implements IEnumerable
public class EventSinkCollection : IEnumerable
public ref class EventSinkCollection : IEnumerable
type EventSinkCollection =  
        interface IEnumerable
public class EventSinkCollection implements IEnumerable

The EventSinkCollection type exposes the following members.


  Name Description
Public method EventSinkCollection Initializes a new instance of an EventSinkCollection object.



  Name Description
Public property Count Gets the total number of event cookies in the collection.
Public property Item Gets or sets the specified cookie from the collection.



  Name Description
Public method Add Adds an event and returns its cookie.
Public method Clear Removes all event cookies.
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 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.)
Public method Remove Removes the specified event cookie from the collection.
Public method RemoveAt Removes the event cookie.
Public method SetAt Updates the event associated with the given cookie.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)


Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator Infrastructure. Microsoft Internal Only.



This helps in the implementation of Visual Studio interfaces that have Advise/Unadvise methods like IVsHierarchy, IVsCfgProvider2, and IVsBuildableProjectCfg.

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


Microsoft.VisualStudio.Shell Namespace