using System.Collections; using System.Collections.Generic; namespace AspClassic.Scripting.Utils; internal class DictionaryUnionEnumerator : CheckedDictionaryEnumerator { private IList _enums; private int _current; public DictionaryUnionEnumerator(IList enums) { _enums = enums; } protected override object GetKey() { return _enums[_current].Key; } protected override object GetValue() { return _enums[_current].Value; } protected override bool DoMoveNext() { if (_current == _enums.Count) { return false; } if (_enums[_current].MoveNext()) { return true; } _current++; return DoMoveNext(); } protected override void DoReset() { for (int i = 0; i < _enums.Count; i++) { _enums[i].Reset(); } _current = 0; } }