Ejemplo n.º 1
0
        /// <summary>
        /// Move to the next location in the collection.
        /// </summary>
        /// <returns>
        /// A boolean indicating whether the current location has moved.
        /// </returns>
        public bool MoveNext()
        {
            // Avoid going beyond the end of the collection.
            if (++this.curIndex >= this.collection.Count)
            {
                return(false);
            }

            // Set current location to next item in collection.
            this.curLocation = this.collection[this.curIndex] as FischerLocation;
            return(true);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FischerLocationEnumerator"/> class.
 /// </summary>
 /// <param name="collection">
 /// The collection for enumeration support.
 /// </param>
 public FischerLocationEnumerator(FischerLocationCollection collection)
 {
     this.collection  = collection;
     this.curIndex    = -1;
     this.curLocation = default(FischerLocation);
 }