Class GuardedEnumerator<T>

A read-only wrapper class for a generic enumerator

Implements

System.Collections.Generic.IEnumerator<T>, System.IDisposable, System.Collections.IEnumerator

Bases

object

Property overview

Current ,
System.Collections.IEnumerator.Current

Constructor overview

GuardedEnumerator<T>(System.Collections.Generic.IEnumerator<T> enumerator)

Method overview

Dispose() ,
Equals(object obj), Inherited from object ,
Finalize(), Inherited from object ,
GetHashCode(), Inherited from object ,
GetType(), Inherited from object ,
MemberwiseClone(), Inherited from object ,
MoveNext() ,
ToString(), Inherited from object

Property details

F T CurrentAccess: Read-Only

Value:The current item of the wrapped enumerator.

Undefined if enumerator is not valid (MoveNext hash been called returning true)
object System.Collections.IEnumerator.CurrentAccess: Read-Only

Constructor details

GuardedEnumerator<T>(System.Collections.Generic.IEnumerator<T> enumerator) Create a wrapper around a generic enumerator
Parameters:
enumerator:The enumerator to wrap

Method details

F void Dispose() Dispose wrapped enumerator.
F bool MoveNext() Move wrapped enumerator to next item, or the first item if this is the first call to MoveNext.
Returns:True if enumerator is valid now