Compartir a través de


VsEnumerable<TComEnumerator,TComEnumerated,TEnumerated> Class

Definition

Represents a VS-style enumeration of TComEnumerated objects created from an enumeration of TEnumerated. Base class for VS-style enumerators using Dev10 and older enumerator interfaces that use PreserveSig

generic <typename TComEnumerator, typename TComEnumerated, typename TEnumerated>
public ref class VsEnumerable abstract
template <typename TComEnumerator, typename TComEnumerated, typename TEnumerated>
[Windows::Foundation::Metadata::WebHostHidden]
class VsEnumerable abstract
public abstract class VsEnumerable<TComEnumerator,TComEnumerated,TEnumerated>
type VsEnumerable<'ComEnumerator, 'ComEnumerated, 'Enumerated> = class
Public MustInherit Class VsEnumerable(Of TComEnumerator, TComEnumerated, TEnumerated)

Type Parameters

TComEnumerator

COM enumerator type (e.g. IVsUIEnumDataSourceVerbs)

TComEnumerated

Type enumerated by TComEnumerator (e.g. string)

TEnumerated

The type of elements in the collection wrapped by the COM enumerator type (e.g. UIDataSourceVerb)

Inheritance
VsEnumerable<TComEnumerator,TComEnumerated,TEnumerated>
Derived

Constructors

VsEnumerable<TComEnumerator,TComEnumerated,TEnumerated>(IEnumerable<TEnumerated>, Int32)

Initializes a new instance of the VsEnumerable<TComEnumerator,TComEnumerated,TEnumerated> class.

VsEnumerable<TComEnumerator,TComEnumerated,TEnumerated>(IEnumerable<TEnumerated>)

Constructs an Enumerator instance.

Properties

IsEnumerating

Gets a Boolean value that indicates whether the enumerator is currently enumerating. If true, the enumerator is enumerating.

Methods

Clone(TComEnumerator)

Creates a copy of the enumerator and all its descendants. The returned enumerator contains the same enumeration state as the current one.

CreateEnumerator(IEnumerable<TEnumerated>, Int32)

Create a new instance of derived class that is the COM-enumerator over the enumerated collection, starting from the specified enumerator position. Derived classes need to implement the following pattern:

  • create a private constructor with similar parameters as this function, calling the protected constructor in this base class with the same signature (collection/enumeratorPosition)
  • override the CreateEnumerator function and call the derived class' constructor with the 2 parameters
GetElement(TEnumerated, TComEnumerated)

Converts an element in the enumerated input collection of type TEnumerated to a TComEnumerated element to be returned by the VS-style enumerator. (e.g. converts a UIDataSourceVerb to the COM-enumerated type 'string' by selecting the verb's name)

Next(UInt32, TComEnumerated[], UInt32)

Gets one or more elements starting at the current position in an enumeration. This method advances the current position in the enumeration by celt elements, so that subsequent calls return the subsequent elements.

Next(UInt32, TComEnumerated[], UInt32[])

Gets one or more elements starting at the current position in an enumeration. This method advances the current position in the enumeration by celt elements, so that subsequent calls return the subsequent elements.

Reset()

Resets the enumeration sequence back to the beginning.

Skip(UInt32)

Moves the current position in an enumeration ahead by a specified number of elements.

Applies to