private IEnumerable <Document> GetRevisionsFromCollections(DocumentsOperationContext context, DocumentsIterationState state) { var collections = state.StartEtagByCollection.Keys.ToList(); foreach (var collection in collections) { var etag = state.StartEtagByCollection[collection]; var collectionName = _database.DocumentsStorage.GetCollection(collection, throwIfDoesNotExist: false); if (collectionName == null) { continue; } state.CurrentCollection = collection; foreach (var document in _database.DocumentsStorage.RevisionsStorage.GetRevisionsFrom(context, collectionName, etag, int.MaxValue)) { yield return(document.current); } } }
private IEnumerable <Document> GetDocumentsFromCollections(DocumentsOperationContext context, DocumentsIterationState state) { var collections = state.StartEtagByCollection.Keys.ToList(); foreach (var collection in collections) { var etag = state.StartEtagByCollection[collection]; state.CurrentCollection = collection; foreach (var document in _database.DocumentsStorage.GetDocumentsFrom(context, collection, etag, 0, int.MaxValue)) { yield return(document); } } }