// methods public IEnumerator <BsonDocument> GetEnumerator() { var cursor = _collection.ExecuteReadOperation(_operation, _readPreference); var adapter = new AsyncCursorEnumeratorAdapter <BsonDocument>(cursor); return(adapter.GetEnumerator()); }
// methods public IEnumerator <BsonDocument> GetEnumerator() { var cursor = _collection.ExecuteReadOperation(_operation, _readPreference); return(cursor.ToEnumerable().GetEnumerator()); }
private IEnumerator <BsonDocument> GetEnumerator(IClientSessionHandle session) { var cursor = _collection.ExecuteReadOperation(session, _operation, _readPreference); return(cursor.ToEnumerable().GetEnumerator()); }