コード例 #1
0
 public AggregateStore(IServiceProvider serviceProvider)
 {
     _serviceProvider           = serviceProvider;
     _logger                    = serviceProvider.GetRequiredService <ILogger <AggregateStore> >();
     _eventJsonSerializer       = serviceProvider.GetRequiredService <IEventJsonSerializer>();
     _persistenceFactory        = serviceProvider.GetRequiredService <IPersistenceFactory>();
     _aggregateFactory          = serviceProvider.GetRequiredService <IAggregateFactory>();
     _transientFaultHandler     = serviceProvider.GetRequiredService <ITransientFaultHandler <IOptimisticConcurrencyResilientStrategy> >();
     _cancellationConfiguration = serviceProvider.GetRequiredService <ICancellationConfiguration>();
 }
 public DomainEventPublisher(
     IDispatchToEventSubscribers dispatchToEventSubscribers,
     IJobScheduler jobScheduler,
     IServiceProvider serviceProvider,
     ISetup setup,
     IEnumerable <ISubscribeSynchronousToAll> subscribeSynchronousToAlls,
     ICancellationConfiguration cancellationConfiguration)
 {
     _dispatchToEventSubscribers = dispatchToEventSubscribers;
     _jobScheduler               = jobScheduler;
     _serviceProvider            = serviceProvider;
     _setup                      = setup;
     _cancellationConfiguration  = cancellationConfiguration;
     _subscribeSynchronousToAlls = subscribeSynchronousToAlls.ToList();
 }
コード例 #3
0
ファイル: AggregateStore.cs プロジェクト: zzpgeorge/EventFlow
 public AggregateStore(
     ILog log,
     IResolver resolver,
     IAggregateFactory aggregateFactory,
     IEventStore eventStore,
     ISnapshotStore snapshotStore,
     ITransientFaultHandler <IOptimisticConcurrencyRetryStrategy> transientFaultHandler,
     ICancellationConfiguration cancellationConfiguration)
 {
     _log                       = log;
     _resolver                  = resolver;
     _aggregateFactory          = aggregateFactory;
     _eventStore                = eventStore;
     _snapshotStore             = snapshotStore;
     _transientFaultHandler     = transientFaultHandler;
     _cancellationConfiguration = cancellationConfiguration;
 }
コード例 #4
0
 public DomainEventPublisher(
     IDispatchToEventSubscribers dispatchToEventSubscribers,
     IDispatchToSagas dispatchToSagas,
     IJobScheduler jobScheduler,
     IServiceProvider serviceProvider,
     IEventFlowConfiguration eventFlowConfiguration,
     IEnumerable <ISubscribeSynchronousToAll> subscribeSynchronousToAlls,
     ICancellationConfiguration cancellationConfiguration,
     IDispatchToReadStores dispatchToReadStores)
 {
     _dispatchToEventSubscribers = dispatchToEventSubscribers;
     _dispatchToSagas            = dispatchToSagas;
     _jobScheduler               = jobScheduler;
     _serviceProvider            = serviceProvider;
     _eventFlowConfiguration     = eventFlowConfiguration;
     _cancellationConfiguration  = cancellationConfiguration;
     _dispatchToReadStores       = dispatchToReadStores;
     _subscribeSynchronousToAlls = subscribeSynchronousToAlls.ToList();
 }
コード例 #5
0
 public DomainEventPublisher(
     IDispatchToEventSubscribers dispatchToEventSubscribers,
     IDispatchToSagas dispatchToSagas,
     IJobScheduler jobScheduler,
     IResolver resolver,
     IEventFlowConfiguration eventFlowConfiguration,
     IEnumerable <IReadStoreManager> readStoreManagers,
     IEnumerable <ISubscribeSynchronousToAll> subscribeSynchronousToAlls,
     ICancellationConfiguration cancellationConfiguration)
 {
     _dispatchToEventSubscribers = dispatchToEventSubscribers;
     _dispatchToSagas            = dispatchToSagas;
     _jobScheduler               = jobScheduler;
     _resolver                   = resolver;
     _eventFlowConfiguration     = eventFlowConfiguration;
     _cancellationConfiguration  = cancellationConfiguration;
     _subscribeSynchronousToAlls = subscribeSynchronousToAlls.ToList();
     _readStoreManagers          = readStoreManagers.ToList();
 }
コード例 #6
0
ファイル: AggregateStore.cs プロジェクト: svoychik/EventFlow
 public AggregateStore(
     ILogger <AggregateStore> logger,
     IServiceProvider serviceProvider,
     IAggregateFactory aggregateFactory,
     IEventStore eventStore,
     ISnapshotStore snapshotStore,
     ITransientFaultHandler <IOptimisticConcurrencyRetryStrategy> transientFaultHandler,
     ICancellationConfiguration cancellationConfiguration,
     IAggregateStoreResilienceStrategy aggregateStoreResilienceStrategy,
     IEventFlowConfiguration eventFlowConfiguration)
 {
     _logger                           = logger;
     _serviceProvider                  = serviceProvider;
     _aggregateFactory                 = aggregateFactory;
     _eventStore                       = eventStore;
     _snapshotStore                    = snapshotStore;
     _transientFaultHandler            = transientFaultHandler;
     _cancellationConfiguration        = cancellationConfiguration;
     _aggregateStoreResilienceStrategy = aggregateStoreResilienceStrategy;
     _eventFlowConfiguration           = eventFlowConfiguration;
 }
コード例 #7
0
 public static CancellationToken Limit(this ICancellationConfiguration configuration, CancellationToken token, CancellationBoundary currentBoundary)
 {
     token.ThrowIfCancellationRequested();
     return(currentBoundary < configuration.CancellationBoundary ? token : CancellationToken.None);
 }