コード例 #1
0
 protected AbstractRepository(IStoreEvents eventStore, IConstructAggregatesEx factory, IDetectConflicts conflictDetector, IIdentityConverter identityConverter)
 {
     this._eventStore        = eventStore;
     this._factory           = factory;
     this._conflictDetector  = conflictDetector;
     this._identityConverter = identityConverter;
     this._identity          = Interlocked.Increment(ref _actualIdentity);
 }
コード例 #2
0
 public EventStoreRepository(
     IStoreEvents eventStore,
     IConstructAggregates factory,
     IDetectConflicts conflictDetector)
 {
     this.eventStore       = eventStore;
     this.factory          = factory;
     this.conflictDetector = conflictDetector;
 }
コード例 #3
0
 public RepositoryEx(
     IStoreEvents eventStore,
     IConstructAggregatesEx factory,
     IDetectConflicts conflictDetector,
     IIdentityConverter identityConverter,
     NEventStore.Logging.ILog logger)
     : base(eventStore, factory, conflictDetector, identityConverter, logger)
 {
     SnapshotManager = NullSnapshotManager.Instance; //Default behavior is avoid snapshot entirely.
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EventStoreRepository" /> class.
 /// </summary>
 /// <param name="eventStoreFactory">The event store factory.</param>
 /// <param name="factory">The factory.</param>
 /// <param name="conflictDetector">The conflict detector.</param>
 /// <param name="unitOfWorkProvider">The unit of work provider.</param>
 public EventStoreRepository(
     IEventStoreFactory eventStoreFactory,
     IAggregateFactory factory,
     IDetectConflicts conflictDetector,
     IUnitOfWorkProvider unitOfWorkProvider)
 {
     _eventStoreFactory  = eventStoreFactory;
     _factory            = factory;
     _conflictDetector   = conflictDetector;
     _unitOfWorkProvider = unitOfWorkProvider;
 }
コード例 #5
0
 protected AbstractRepository(
     IStoreEvents eventStore,
     IConstructAggregatesEx factory,
     IDetectConflicts conflictDetector,
     IIdentityConverter identityConverter,
     NEventStore.Logging.ILog logger)
 {
     this._eventStore        = eventStore;
     this._factory           = factory;
     this._conflictDetector  = conflictDetector;
     this._identityConverter = identityConverter;
     this._identity          = Interlocked.Increment(ref _lastAssignedIdentity);
     _logger = logger;
 }
コード例 #6
0
 public static void Register <TUncommitted, TCommitted>(this IDetectConflicts conflictDetector, ConflictDelegate handler)
     where TUncommitted : class
     where TCommitted : class
 {
     conflictDetector.Register <TUncommitted, TCommitted>((uncommitted, committed) => handler(uncommitted, committed));
 }
コード例 #7
0
 public RepositoryEx(IStoreEvents eventStore, IConstructAggregatesEx factory, IDetectConflicts conflictDetector, IIdentityConverter identityConverter)
     : base(eventStore, factory, conflictDetector, identityConverter)
 {
 }