public JoesUnitOfWork(Guid commandId, IDomainRepository domainRepository, IStoreEvents eventStore, ISnapshotStore snapshotStore, IEventBus eventBus, ISnapshottingPolicy snapshottingPolicy) : base(commandId) { _eventStream = new UncommittedEventStream(commandId); _commitId = commandId; _eventStore = eventStore; _domainRepository = domainRepository; _snapshotStore = snapshotStore; _eventBus = eventBus; _snapshottingPolicy = snapshottingPolicy; }
public JoesUnitOfWork(Guid commandId, IDomainRepository domainRepository, IStoreEvents eventStore, ISnapshotStore snapshotStore, IEventBus eventBus, ISnapshottingPolicy snapshottingPolicy) : base(commandId) { _eventStream = new UncommittedEventStream(commandId); _commitId = commandId; _eventStore = eventStore; _domainRepository = domainRepository; _snapshotStore = snapshotStore; _eventBus = eventBus; _snapshottingPolicy = snapshottingPolicy; }
public UnitOfWork(Guid commandId, IDomainRepository domainRepository, IEventStore eventStore, ISnapshotStore snapshotStore, IEventBus eventBus, ISnapshottingPolicy snapshottingPolicy) : base(commandId) { Contract.Requires <ArgumentNullException>(domainRepository != null); Contract.Requires <ArgumentNullException>(snapshotStore != null); Contract.Requires <ArgumentNullException>(eventStore != null); Contract.Requires <ArgumentNullException>(eventBus != null); Contract.Requires <ArgumentNullException>(snapshottingPolicy != null); _repository = domainRepository; _snapshottingPolicy = snapshottingPolicy; _eventBus = eventBus; _snapshotStore = snapshotStore; _eventStore = eventStore; _eventStream = new UncommittedEventStream(commandId); _dirtyInstances = new Queue <AggregateRoot>(); }
public UnitOfWork(Guid commandId, IDomainRepository domainRepository, IEventStore eventStore, ISnapshotStore snapshotStore, IEventBus eventBus, ISnapshottingPolicy snapshottingPolicy) : base(commandId) { Contract.Requires<ArgumentNullException>(domainRepository != null); Contract.Requires<ArgumentNullException>(snapshotStore != null); Contract.Requires<ArgumentNullException>(eventStore != null); Contract.Requires<ArgumentNullException>(eventBus != null); Contract.Requires<ArgumentNullException>(snapshottingPolicy != null); _repository = domainRepository; _snapshottingPolicy = snapshottingPolicy; _eventBus = eventBus; _snapshotStore = snapshotStore; _eventStore = eventStore; _eventStream = new UncommittedEventStream(commandId); _dirtyInstances = new Queue<AggregateRoot>(); }