public override ObjectInstance Next() { if (_position < _map.GetSize()) { var key = _map._map.GetKey(_position); var value = _map._map[key]; _position++; return(new KeyValueIteratorPosition(_engine, key, value)); } return(KeyValueIteratorPosition.Done); }
public override bool TryIteratorStep(out ObjectInstance nextItem) { if (_position < _map.GetSize()) { var key = _map._map.GetKey(_position); var value = _map._map[key]; _position++; nextItem = new KeyValueIteratorPosition(_engine, key, value); return(true); } nextItem = KeyValueIteratorPosition.Done; return(false); }