void System.Collections.IEnumerator.Reset() { if (_version != _list.version) { throw Failure.CollectionModified(); } _node = _list._head; _index = 0; }
public IEnumerator <KeyValuePair <SymbolType, T> > GetEnumerator() { int start = _version; for (int i = 0; i < _values.Length; i++) { if (_version != start) { throw Failure.CollectionModified(); } yield return(new KeyValuePair <SymbolType, T>((SymbolType)i, _values[i])); } }
public IEnumerator <KeyValuePair <Verbosity, T> > GetEnumerator() { int startingVersion = this.version; int index = 0; foreach (T t in this.values) { if (startingVersion != this.version) { throw Failure.CollectionModified(); } yield return(new KeyValuePair <Verbosity, T>(AllVerbosityValues()[index++], t)); } }
public override IEnumerator <PropertyNode> GetEnumerator() { PropertyNode current = this.head; int startVersion = this.version; while (current != null) { if (startVersion != this.version) { throw Failure.CollectionModified(); } yield return(current); current = current.NextSibling; } }
public bool MoveNext() { if (_version != _list.version) { throw Failure.CollectionModified(); } if (_node == null) { _index = _list.Count + 1; return(false); } ++_index; _current = _node; _node = _node.next; if (_node == _list._head) { _node = null; } return(true); }