VsEnumerable<TComEnumerator, TComEnumerated, TEnumerated>.CreateEnumerator Method
Creates a new instance of derived class that is the COM-enumerator over the enumerated collection, starting from the specified enumerator position.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)
Syntax
'Declaración
Protected MustOverride Function CreateEnumerator ( _
collection As IEnumerable(Of TEnumerated), _
enumeratorPosition As Integer _
) As TComEnumerator
protected abstract TComEnumerator CreateEnumerator(
IEnumerable<TEnumerated> collection,
int enumeratorPosition
)
Parameters
- collection
Type: System.Collections.Generic.IEnumerable<TEnumerated>
The collection to be enumerated.
- enumeratorPosition
Type: System.Int32
The position of the created enumerator in the collection.
Return Value
Type: TComEnumerator
An instance of the derived class implementing the enumerator.
Remarks
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 and enumeratorPosition).
Override the CreateEnumerator method and call the derived class' constructor with the two parameters.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
VsEnumerable<TComEnumerator, TComEnumerated, TEnumerated> Class