//------------------------------------------------------------------------------------------- /// <summary> /// Moves to the next entry in the enumeration /// </summary> /// <returns>True on success</returns> public bool MoveNext() { if (_index < (_collection.Count - 1)) { _index++; _currentElement = _collection[_index]; return(true); } _index = _collection.Count; return(false); }
//------------------------------------------------------------------------------------------- /// <summary> /// Determines the index of a given item /// </summary> /// <param name="value">The item to be located</param> /// <returns></returns> public int IndexOf(T value) { return this.List.IndexOf(value); }
//------------------------------------------------------------------------------------------- /// <summary> /// Determines whether the collection contains a specific item /// </summary> /// <param name="value">The item to be located</param> /// <returns>True if found</returns> public bool Contains(T value) { return this.List.Contains(value); }
//------------------------------------------------------------------------------------------- /// <summary> /// Adds an item to the collection /// </summary> /// <param name="value">The item to add</param> /// <returns>The position into which the new element was inserted</returns> public int Add(T value) { return this.List.Add(value); }
//------------------------------------------------------------------------------------------- /// <summary> /// Resets the enumeration /// </summary> public void Reset() { _index--; _currentElement = null; }
//------------------------------------------------------------------------------------------- /// <summary> /// Moves to the next entry in the enumeration /// </summary> /// <returns>True on success</returns> public bool MoveNext() { if (_index < (_collection.Count - 1)) { _index++; _currentElement = _collection[_index]; return true; } _index = _collection.Count; return false; }
//------------------------------------------------------------------------------------------- /// <summary> /// Removes the first occurance of the specified item in the collection /// </summary> /// <param name="value">The item to be removed</param> public void Remove(T value) { this.List.Remove(value); }
//------------------------------------------------------------------------------------------- /// <summary> /// Inserts an item into the specified position in the collection /// </summary> /// <param name="index">The zero-based index at which value should be inserted</param> /// <param name="value"></param> public void Insert(int index, T value) { this.List.Insert(index, value); }
//------------------------------------------------------------------------------------------- /// <summary> /// Determines the index of a given item /// </summary> /// <param name="value">The item to be located</param> /// <returns></returns> public int IndexOf(T value) { return(this.List.IndexOf(value)); }
//------------------------------------------------------------------------------------------- /// <summary> /// Determines whether the collection contains a specific item /// </summary> /// <param name="value">The item to be located</param> /// <returns>True if found</returns> public bool Contains(T value) { return(this.List.Contains(value)); }
//------------------------------------------------------------------------------------------- /// <summary> /// Adds an item to the collection /// </summary> /// <param name="value">The item to add</param> /// <returns>The position into which the new element was inserted</returns> public int Add(T value) { return(this.List.Add(value)); }