Partilhar via


IVsAsyncEnum Interface

Definition

Implemented by enumerators supporting asynchronous behavior.

public interface class IVsAsyncEnum
public interface class IVsAsyncEnum
__interface IVsAsyncEnum
[System.Runtime.InteropServices.Guid("C734671A-9BB0-45C5-A08E-B9AB73CF5F47")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsAsyncEnum
[System.Runtime.InteropServices.Guid("C734671A-9BB0-45C5-A08E-B9AB73CF5F47")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsAsyncEnum
[<System.Runtime.InteropServices.Guid("C734671A-9BB0-45C5-A08E-B9AB73CF5F47")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsAsyncEnum = interface
[<System.Runtime.InteropServices.Guid("C734671A-9BB0-45C5-A08E-B9AB73CF5F47")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsAsyncEnum = interface
Public Interface IVsAsyncEnum
Attributes

Remarks

You should query for the interface and advise any callback interfaces before calling the Next method. Synchronous enumerators can support IVsAsyncEnum, and the same requirements apply (the callback interfaces are added prior to normal direct manipulation of the enumerator via its primary interface). However, the entire count of elements available is passed as cElementsAvailable to OnDataAvailable, and fIsComplete is set to true.

Stopping an asynchronous enumerator is itself an asynchronous operation. When the enumerator is stopped, an OnDataAvailable event is fired, with cElementsAvailable set to zero, and fIsComplete set to true. Passing true to the Stop call causes the thread to block until the enumerator has fired its final OnDataAvailable event.

Methods

AdviseAsyncEnumCallback(IVsAsyncEnumCallback, UInt32)

Enables the client to receive events about changes to the asynchronous enumeration.

Stop(Int32)

Requests that the asynchronous enumeration be stopped.

UnadviseAsyncEnumCallback(UInt32)

Indicates the client is no longer interested in receiving asynchronous enumeration events.

Applies to