38 lines
943 B
C#
38 lines
943 B
C#
using System;
|
|
using System.Collections;
|
|
|
|
namespace BCG
|
|
{
|
|
/// <summary>
|
|
/// Used for enumerating an IEnumerable (ex ICollection). Furthermore, this is the
|
|
/// default Enueramtor used when enumerating asn IBlueRow
|
|
/// </summary>
|
|
public class BlueRowEnumerator : IEnumerator
|
|
{
|
|
protected int myPos = -1;
|
|
protected int myRowSize = -1;
|
|
protected IBlueRow myRow;
|
|
|
|
public BlueRowEnumerator (IBlueRow row)
|
|
{
|
|
myRow = row;
|
|
myRowSize = row.schema.columnNames.Length;
|
|
}
|
|
|
|
#region IEnumerator members
|
|
public void Reset() {myPos = 0;}
|
|
|
|
public bool MoveNext ()
|
|
{
|
|
if (myPos == myRowSize - 1)
|
|
return false;
|
|
myPos ++;
|
|
return true;
|
|
}
|
|
|
|
public virtual object Current {get{return myRow[myPos];}}
|
|
#endregion
|
|
}
|
|
|
|
}
|