public bool MoveNext() { QueryParamDictionary parent = _parent; if (parent == null) { throw new ObjectDisposedException(this.GetType().FullName); } Monitor.Enter(parent._syncRoot); try { if (_position < parent._innerList.Count) { _position++; } if (_position >= parent._innerList.Count) { return(false); } QueryParamEntry entry = parent._innerList[_position]; _key = entry.Key; _value = entry.Value; } finally { Monitor.Exit(parent._syncRoot); } return(true); }
// This code added to correctly implement the disposable pattern. public void Dispose() { _parent = null; _key = null; }
internal DictionaryEnumerator(QueryParamDictionary parent) { _parent = parent; }
internal ValueCollection(QueryParamDictionary parent) { _parent = parent; }