Class PagedEnumerator
PagedEnumerator is an IEnumerator implementation based on a concept of a page Advancer - a pluggable component that knows how to supply a next page of objects to iterate through.
Implements
Inherited Members
Namespace: Tangosol.Util
Assembly: Coherence.dll
Syntax
public class PagedEnumerator : IEnumerator
Remarks
As common to iterators, this implementation is not thread safe.
Constructors
PagedEnumerator(IAdvancer)
Construct a PagedEnumerator based on the specified PagedEnumerator.IAdvancer.
Declaration
public PagedEnumerator(PagedEnumerator.IAdvancer advancer)
Parameters
Type | Name | Description |
---|---|---|
PagedEnumerator.IAdvancer | advancer | The underlying IAdvancer. |
Fields
m_advancer
The underlying IAdvancer.
Declaration
protected PagedEnumerator.IAdvancer m_advancer
Field Value
Type | Description |
---|---|
PagedEnumerator.IAdvancer |
m_curr
Currently "Active" object.
Declaration
protected object m_curr
Field Value
Type | Description |
---|---|
object |
m_enumPage
An IEnumerator for the current page.
Declaration
protected IEnumerator m_enumPage
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. |