public MultipleStreamsCatchupCache(IConnectionStatusMonitor <IEventStoreConnection> connectionMonitor,
                                    MultipleStreamsCatchupCacheConfiguration <TAggregate> catchupCacheConfiguration,
                                    IEventTypeProvider <TAggregate> eventTypeProvider,
                                    ILoggerFactory loggerFactory,
                                    ISnapshotStore <TAggregate>?snapshotStore = null,
                                    ISnapshotStrategy?snapshotStrategy        = null) : base(connectionMonitor, catchupCacheConfiguration, eventTypeProvider, loggerFactory, snapshotStore, snapshotStrategy)
 {
     _multipleStreamsCatchupCacheConfiguration = catchupCacheConfiguration;
 }
Esempio n. 2
0
        protected BaseOneOrManyStreamCatchupCache(IConnectionStatusMonitor <IEventStoreConnection> connectionMonitor, MultipleStreamsCatchupCacheConfiguration <TAggregate> catchupCacheConfiguration, IEventTypeProvider <TAggregate> eventTypeProvider, ILoggerFactory loggerFactory, ISnapshotStore <TAggregate>?snapshotStore = null, ISnapshotStrategy?snapshotStrategy = null) : base(connectionMonitor, catchupCacheConfiguration, eventTypeProvider, loggerFactory, snapshotStore, snapshotStrategy)
        {
            var catchupCacheSubscriptionHolders = catchupCacheConfiguration.StreamIds.Select(streamId => new CatchupCacheSubscriptionHolder <TAggregate>(streamId, catchupCacheConfiguration.CrashAppIfSubscriptionFail)).ToArray();

            Initialize(catchupCacheSubscriptionHolders);
        }