Share via


EventSinkCollection Class

Definition

Maps objects to and from integer "cookies". This helps in the implementation of VS interfaces that have Advise/Unadvise methods, for example, IVsHierarchy, IVsCfgProvider2, IVsBuildableProjectCfg and so on.

public ref class EventSinkCollection : System::Collections::IEnumerable
public class EventSinkCollection : System.Collections.IEnumerable
type EventSinkCollection = class
    interface IEnumerable
Public Class EventSinkCollection
Implements IEnumerable
Inheritance
EventSinkCollection
Implements

Remarks

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

Constructors

EventSinkCollection()

Initializes a new instance of an EventSinkCollection object.

Properties

Count

Gets the total number of event cookies in the collection.

Item[UInt32]

Gets or sets the specified cookie from the collection.

Methods

Add(Object)

Adds an event and returns its cookie.

Clear()

Removes all event cookies.

Remove(Object)

Removes the specified event cookie from the collection.

RemoveAt(UInt32)

Removes the event cookie.

SetAt(UInt32, Object)

Updates the event associated with the given cookie.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Microsoft Internal Only.

Applies to