コード例 #1
0
        // private methods
        private MongoContainerType Pop()
        {
            var poppedContainerType = _currentPosition.ContainerType;

            _currentPosition = _positionsStack.Pop();
            return(poppedContainerType);
        }
コード例 #2
0
        private void Push(MongoContainerType containerType)
        {
            UpdateIndex();

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

            // TODO: check for max depth exceeded
        }
コード例 #3
0
        private void Push(MongoContainerType containerType)
        {
            UpdateIndex();

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

            // TODO: check for max depth exceeded
        }
コード例 #4
0
 // private methods
 private MongoContainerType Pop()
 {
     var poppedContainerType = _currentPosition.ContainerType;
     _currentPosition = _positionsStack.Pop();
     return poppedContainerType;
 }
コード例 #5
0
 // constructors
 protected JsonReaderBase()
 {
     _currentPosition = new MongoPosition(MongoContainerType.None);
     _positionsStack = new Stack<MongoPosition>();
 }
コード例 #6
0
 // constructors
 protected JsonReaderBase()
 {
     _currentPosition = new MongoPosition(MongoContainerType.None);
     _positionsStack  = new Stack <MongoPosition>();
 }