Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
        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>();
        }
Esempio n. 4
0
        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>();
        }