Ejemplo n.º 1
0
        // private methods
        private MongoContainerType Pop()
        {
            var poppedContainerType = _currentPosition.ContainerType;

            _currentPosition = _positionsStack.Pop();
            return(poppedContainerType);
        }
Ejemplo n.º 2
0
        private void Push(MongoContainerType containerType)
        {
            UpdateIndex();

            _positionsStack.Push(_currentPosition);
            _currentPosition = new MongoPosition(containerType);

            // TODO: check for max depth exceeded
        }
        private void Push(MongoContainerType containerType)
        {
            UpdateIndex();

            _positionsStack.Push(_currentPosition);
            _currentPosition = new MongoPosition(containerType);

            // TODO: check for max depth exceeded
        }
 // private methods
 private MongoContainerType Pop()
 {
     var poppedContainerType = _currentPosition.ContainerType;
     _currentPosition = _positionsStack.Pop();
     return poppedContainerType;
 }
 // constructors
 protected JsonReaderBase()
 {
     _currentPosition = new MongoPosition(MongoContainerType.None);
     _positionsStack = new Stack<MongoPosition>();
 }
Ejemplo n.º 6
0
 // constructors
 protected JsonReaderBase()
 {
     _currentPosition = new MongoPosition(MongoContainerType.None);
     _positionsStack  = new Stack <MongoPosition>();
 }