Class ConverterEnumerator
An implementation of IEnumerator which converts each of the items which it enumerates.
Implements
Inherited Members
Namespace: Tangosol.Util
Assembly: Coherence.dll
Syntax
public class ConverterEnumerator : IEnumerator
Constructors
ConverterEnumerator(IEnumerator, IConverter)
Construct the Converter enumerator based on an IEnumerator.
Declaration
public ConverterEnumerator(IEnumerator enumerator, IConverter conv)
Parameters
Type | Name | Description |
---|---|---|
IEnumerator | enumerator | IEnumerator of objects to convert. |
IConverter | conv | An IConverter. |
ConverterEnumerator(object[], IConverter)
Construct the Converter enumerator based on an array of objects.
Declaration
public ConverterEnumerator(object[] items, IConverter conv)
Parameters
Type | Name | Description |
---|---|---|
object[] | items | Array of objects to enumerate. |
IConverter | conv | An IConverter. |
Fields
m_conv
IConverter to convert each item.
Declaration
protected IConverter m_conv
Field Value
Type | Description |
---|---|
IConverter |
m_enum
IEnumerator of objects to convert.
Declaration
protected IEnumerator m_enum
Field Value
Type | Description |
---|---|
IEnumerator |
Properties
Current
Gets the current element in the collection.
Declaration
public virtual object Current { get; }
Property Value
Type | Description |
---|---|
object | The current element in the collection. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The enumerator is positioned before the first element of the collection or after the last element. |
Methods
MoveNext()
Advances the enumerator to the next element of the collection.
Declaration
public virtual bool MoveNext()
Returns
Type | Description |
---|---|
bool | true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The collection was modified after the enumerator was created. |
Reset()
Sets the enumerator to its initial position, which is before the first element in the collection.
Declaration
public virtual void Reset()
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The collection was modified after the enumerator was created. |