Exemple #1
0
        public List<ReferencePack> Read(string fullCollectionName, BsonDocument query)
        {
            var collection = GetCollection(fullCollectionName);
            var mongoQuery = new QueryDocument(query);

            var packer = new ReferencePacker();

            foreach ( var doc in collection.FindAs<BsonDocument>(mongoQuery) )
            {
                packer.Add( MongoDocumentReferenceExtractor.Parse(doc) );
            }

            return packer.Get();
        }
Exemple #2
0
 public static List<ReferencePack> GetChanges(MongoInsertMessage request)
 {
     var packer = new ReferencePacker();
     packer.Add(MongoDocumentReferenceExtractor.Parse(request));
     return packer.Get();
 }