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; }
public AggregateRepository(IInstantiateAggregate instantiateAggregate, IStoreEvents storeEvents, IConflictDetector conflictDetector) { _instantiateAggregate = instantiateAggregate; _conflictDetector = conflictDetector; _storeEvents = storeEvents; }
public EventStore(IStoreEvents storeEvents, IConflictDetector conflictDetector) { _storeEvents = storeEvents ?? throw new ArgumentNullException(nameof(storeEvents)); _conflictDetector = conflictDetector ?? throw new ArgumentNullException(nameof(conflictDetector)); }
public NEventStoreRepository(IStoreEvents eventStore, IAggregateFactory aggregateFactory, IConflictDetector conflictDetector) { _eventStore = eventStore; _aggregateFactory = aggregateFactory; _conflictDetector = conflictDetector; }
public NEventStoreRepository(IStoreEvents eventStore, IConflictDetector conflictDetector) : this(eventStore, new DefaultAggregateFactory(), conflictDetector) { }