Example #1
0
        public IEnumerable <Document> ReadDocuments(
            DocumentReader documentReader,
            HashSet <string> select,
            int skip = 0,
            int take = 0)
        {
            var docCount = documentReader.DocumentCount();

            if (take == 0)
            {
                take = docCount;
            }

            var  took  = 0;
            long docId = skip;

            while (docId <= docCount && took++ < take)
            {
                yield return(ReadDocument((documentReader.CollectionId, docId++), select, documentReader));
            }
        }