Пример #1
0
        public EventStore(IEventPersistance persistance, IEventPublisher publisher, IConflictDetector conflictDetector)
        {
            Contract.Requires<ArgumentNullException>(persistance != null, "persistance cannot be null");
            Contract.Requires<ArgumentNullException>(publisher != null, "publisher cannot be null");
            Contract.Requires<ArgumentNullException>(conflictDetector != null, "conflictDetector cannot be null");

            _persistance = persistance;
            _publisher = publisher;
            _conflictDetector = conflictDetector;
        }
Пример #2
0
 public AggregateRepository(IInstantiateAggregate instantiateAggregate, IStoreEvents storeEvents, IConflictDetector conflictDetector)
 {
     _instantiateAggregate = instantiateAggregate;
     _conflictDetector     = conflictDetector;
     _storeEvents          = storeEvents;
 }
Пример #3
0
 public EventStore(IStoreEvents storeEvents, IConflictDetector conflictDetector)
 {
     _storeEvents      = storeEvents ?? throw new ArgumentNullException(nameof(storeEvents));
     _conflictDetector = conflictDetector ?? throw new ArgumentNullException(nameof(conflictDetector));
 }
Пример #4
0
 public NEventStoreRepository(IStoreEvents eventStore, IAggregateFactory aggregateFactory, IConflictDetector conflictDetector)
 {
     _eventStore       = eventStore;
     _aggregateFactory = aggregateFactory;
     _conflictDetector = conflictDetector;
 }
Пример #5
0
 public NEventStoreRepository(IStoreEvents eventStore, IConflictDetector conflictDetector)
     : this(eventStore, new DefaultAggregateFactory(), conflictDetector)
 {
 }