예제 #1
0
        public bool MoveNext()
        {
            if (_position >= _refs.Count)
            {
                return(false);
            }

            try
            {
                Current = TokenSerializer.Load(_reader, _position++);
            }
            //handle exceptions in case FAS
            catch (ObjectDisposedException dipsposedExp)
            {
                //Reset();
                throw new TokenIteratorUnableMoveNextException("Unable move token iterator", dipsposedExp);
            }
            catch (NullReferenceException nullRedExp)
            {
                //Reset();
                throw new TokenIteratorUnableMoveNextException("Unable move token iterator", nullRedExp);
            }

            return(true);
        }