using System; using System.Collections; namespace BCG { /// /// Used for enumerating an IEnumerable (ex ICollection). Furthermore, this is the /// default Enueramtor used when enumerating asn IBlueRow /// 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 } }