Example #1
0
 public EventStore(IEventVisitorFactory visitorsFactory,
                   IEventReaderCreator readerCreator,
                   IMongoDatabase storageDatabase,
                   ISystemClock time)
 {
     this.time            = time;
     this.visitorsFactory = visitorsFactory;
     this.readerCreator   = readerCreator;
     eventsCollection     = storageDatabase.GetCollection <BsonDocument>("events");
 }
Example #2
0
 public Snapshot(IEventVisitorFactory visitorsFactory,
                 IEventReaderCreator readerCreator,
                 IMongoDatabase database,
                 ISystemClock time,
                 IOptions <EventsOptions> options)
 {
     this.visitorsFactory     = visitorsFactory;
     this.readerCreator       = readerCreator;
     this.time                = time;
     eventsCollection         = database.GetCollection <BsonDocument>("events");
     makeSnapshotForOlderThan = options.Value.MakeSnapshotForOlderThan;
     startSnapshotMakingLimit = options.Value.StartSnapshotMakingLimit;
 }
Example #3
0
 public StorageStore(IEventStore eventStore, IEventVisitorFactory visitorsFactory)
 {
     this.eventStore      = eventStore;
     this.visitorsFactory = visitorsFactory;
 }