Share via


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

System.Object
  Microsoft.VisualStudio.Shell.EventSinkCollection

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

Syntax

'Declaration
<CLSCompliantAttribute(False)> _
Public Class EventSinkCollection _
    Implements IEnumerable
[CLSCompliantAttribute(false)]
public class EventSinkCollection : IEnumerable
[CLSCompliantAttribute(false)]
public ref class EventSinkCollection : IEnumerable
[<CLSCompliantAttribute(false)>]
type EventSinkCollection =  
    class
        interface IEnumerable
    end
public class EventSinkCollection implements IEnumerable

The EventSinkCollection type exposes the following members.

Constructors

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

Top

Properties

  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.

Top

Methods

  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.)

Top

Explicit Interface Implementations

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

Top

Remarks

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

Reference

Microsoft.VisualStudio.Shell Namespace