// private methods private MongoContainerType Pop() { var poppedContainerType = _currentPosition.ContainerType; _currentPosition = _positionsStack.Pop(); return(poppedContainerType); }
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>(); }
// constructors protected JsonReaderBase() { _currentPosition = new MongoPosition(MongoContainerType.None); _positionsStack = new Stack <MongoPosition>(); }