public StreamProjection(
     ICollectionWrapper <StreamReadModel, Int64> streamReadModelCollection,
     IDocumentWriter documentWriter,
     IBlobStore blobStore,
     IQueueManager queueDispatcher,
     IReader <DocumentDescriptorReadModel, DocumentDescriptorId> documentDescriptorReadModel)
 {
     if (queueDispatcher is IObserveProjection)
     {
         Observe(queueDispatcher as IObserveProjection);
     }
     _streamReadModelCollection   = streamReadModelCollection;
     _documentDescriptorReadModel = documentDescriptorReadModel;
     _documentWriter = documentWriter;
     _blobStore      = blobStore;
     _streamReadModelCollection.Attach(this, false);
     if (_streamReadModelCollection.All.Any())
     {
         _lastId = _streamReadModelCollection.All.Max(s => s.Id);
     }
     else
     {
         _lastId = 0;
     }
 }
 public DocumentProjection(
     IDocumentWriter writer,
     IReader <DocumentDescriptorReadModel, DocumentDescriptorId> documentDescriptorReader,
     ICollectionWrapper <DocumentDeletedReadModel, String> documentDeletedWrapper)
 {
     _writer = writer;
     _documentDescriptorReader = documentDescriptorReader;
     _documentDeletedWrapper   = documentDeletedWrapper;
     _documentDeletedWrapper.Attach(this, false);
 }
        public DocumentDescriptorProjection(
            ICollectionWrapper <DocumentDescriptorReadModel, DocumentDescriptorId> documents, IDocumentWriter handleWriter)
        {
            _documents    = documents;
            _handleWriter = handleWriter;

            _documents.Attach(this, false);

            _documents.OnSave = (d, e) =>
            {
                d.FormatsCount = d.Formats.Count;
            };
        }
 public Projection2(ICollectionWrapper <SampleReadModel2, string> collection)
 {
     _collection = collection;
     _collection.Attach(this, false);
 }
 public ProjectionPollableReadmodel(ICollectionWrapper <SampleReadModelPollableTest, TestId> collection)
 {
     _collection = collection;
     _collection.Attach(this, false);
 }
 public TypedIdProjection(ICollectionWrapper <SampleReadModelTest, String> collection)
 {
     _collection = collection;
     _collection.Attach(this, false);
 }
 public Projection3(ICollectionWrapper <SampleReadModel3, string> collection)
 {
     _collection = collection;
     _collection.Attach(this, false);
     Signature = base.Info.Signature;
 }
Exemple #8
0
 public ProjectionTypedId(ICollectionWrapper <SampleReadModelTestId, TestId> collection)
 {
     _collection = collection;
     _collection.Attach(this, false);
 }
 public DocumentStatsProjection(ICollectionWrapper <DocumentStats, string> collection, IBlobStore blobStore)
 {
     _collection = collection;
     _blobStore  = blobStore;
     _collection.Attach(this, false);
 }