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(); }
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; }
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(); }
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(); }
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; }
public static CancellationToken Limit(this ICancellationConfiguration configuration, CancellationToken token, CancellationBoundary currentBoundary) { token.ThrowIfCancellationRequested(); return(currentBoundary < configuration.CancellationBoundary ? token : CancellationToken.None); }