//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version: 1.1.4322.573 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace Server.Factions { using System; using System.Collections; /// /// Strongly typed collection of Server.Factions.GuardList. /// public class GuardListCollection : System.Collections.CollectionBase { /// /// Default constructor. /// public GuardListCollection() { } /// /// Gets or sets the value of the Server.Factions.GuardList at a specific position in the GuardListCollection. /// public Server.Factions.GuardList this[int index] { get { return ((Server.Factions.GuardList)(this.List[index])); } set { this.List[index] = value; } } /// /// Append a Server.Factions.GuardList entry to this collection. /// /// Server.Factions.GuardList instance. /// The position into which the new element was inserted. public int Add(Server.Factions.GuardList value) { return this.List.Add(value); } /// /// Determines whether a specified Server.Factions.GuardList instance is in this collection. /// /// Server.Factions.GuardList instance to search for. /// True if the Server.Factions.GuardList instance is in the collection; otherwise false. public bool Contains(Server.Factions.GuardList value) { return this.List.Contains(value); } /// /// Retrieve the index a specified Server.Factions.GuardList instance is in this collection. /// /// Server.Factions.GuardList instance to find. /// The zero-based index of the specified Server.Factions.GuardList instance. If the object is not found, the return value is -1. public int IndexOf(Server.Factions.GuardList value) { return this.List.IndexOf(value); } /// /// Removes a specified Server.Factions.GuardList instance from this collection. /// /// The Server.Factions.GuardList instance to remove. public void Remove(Server.Factions.GuardList value) { this.List.Remove(value); } /// /// Returns an enumerator that can iterate through the Server.Factions.GuardList instance. /// /// An Server.Factions.GuardList's enumerator. public new GuardListCollectionEnumerator GetEnumerator() { return new GuardListCollectionEnumerator(this); } /// /// Insert a Server.Factions.GuardList instance into this collection at a specified index. /// /// Zero-based index. /// The Server.Factions.GuardList instance to insert. public void Insert(int index, Server.Factions.GuardList value) { this.List.Insert(index, value); } /// /// Strongly typed enumerator of Server.Factions.GuardList. /// public class GuardListCollectionEnumerator : System.Collections.IEnumerator { /// /// Current index /// private int _index; /// /// Current element pointed to. /// private Server.Factions.GuardList _currentElement; /// /// Collection to enumerate. /// private GuardListCollection _collection; /// /// Default constructor for enumerator. /// /// Instance of the collection to enumerate. internal GuardListCollectionEnumerator(GuardListCollection collection) { _index = -1; _collection = collection; } /// /// Gets the Server.Factions.GuardList object in the enumerated GuardListCollection currently indexed by this instance. /// public Server.Factions.GuardList Current { get { if (((_index == -1) || (_index >= _collection.Count))) { throw new System.IndexOutOfRangeException("Enumerator not started."); } else { return _currentElement; } } } /// /// Gets the current element in the collection. /// object IEnumerator.Current { get { if (((_index == -1) || (_index >= _collection.Count))) { throw new System.IndexOutOfRangeException("Enumerator not started."); } else { return _currentElement; } } } /// /// Reset the cursor, so it points to the beginning of the enumerator. /// public void Reset() { _index = -1; _currentElement = null; } /// /// Advances the enumerator to the next queue of the enumeration, if one is currently available. /// /// true, if the enumerator was succesfully advanced to the next queue; false, if the enumerator has reached the end of the enumeration. public bool MoveNext() { if ((_index < (_collection.Count - 1))) { _index = (_index + 1); _currentElement = this._collection[_index]; return true; } _index = _collection.Count; return false; } } } }