コード例 #1
0
        public EventStoreAllCatchUpSubscription SubscribeToAllFrom(
            Position?lastCheckpoint,
            bool resolveLinkTos,
            Action <EventStoreCatchUpSubscription, ResolvedEvent> eventAppeared,
            Action <EventStoreCatchUpSubscription> liveProcessingStarted = null,
            Action <EventStoreCatchUpSubscription, SubscriptionDropReason, Exception> subscriptionDropped = null,
            UserCredentials userCredentials = null,
            int readBatchSize = 500)
        {
            Ensure.NotNull(eventAppeared, "eventAppeared");
            var catchUpSubscription =
                new EventStoreAllCatchUpSubscription(this, _settings.Log, lastCheckpoint, resolveLinkTos,
                                                     userCredentials, eventAppeared, liveProcessingStarted,
                                                     subscriptionDropped, _settings.VerboseLogging, readBatchSize);

            catchUpSubscription.Start();
            return(catchUpSubscription);
        }
コード例 #2
0
        public EventStoreAllCatchUpSubscription SubscribeToAllFrom(
            Position?lastCheckpoint,
            CatchUpSubscriptionSettings settings,
            Action <EventStoreCatchUpSubscription, ResolvedEvent> eventAppeared,
            Action <EventStoreCatchUpSubscription> liveProcessingStarted = null,
            Action <EventStoreCatchUpSubscription, SubscriptionDropReason, Exception> subscriptionDropped = null,
            UserCredentials userCredentials = null)
        {
            Ensure.NotNull(eventAppeared, "eventAppeared");
            Ensure.NotNull(settings, "settings");
            var catchUpSubscription =
                new EventStoreAllCatchUpSubscription(this, _settings.Log, lastCheckpoint,
                                                     userCredentials, eventAppeared, liveProcessingStarted,
                                                     subscriptionDropped, settings);

            catchUpSubscription.Start();
            return(catchUpSubscription);
        }
コード例 #3
0
 public EventStoreAllCatchUpSubscription SubscribeToAllFrom(
     Position? lastCheckpoint,
     CatchUpSubscriptionSettings settings,
     Action<EventStoreCatchUpSubscription, ResolvedEvent> eventAppeared,
     Action<EventStoreCatchUpSubscription> liveProcessingStarted = null,
     Action<EventStoreCatchUpSubscription, SubscriptionDropReason, Exception> subscriptionDropped = null,
     UserCredentials userCredentials = null)
 {
     Ensure.NotNull(eventAppeared, "eventAppeared");
     Ensure.NotNull(settings, "settings");
     var catchUpSubscription =
             new EventStoreAllCatchUpSubscription(this, _settings.Log, lastCheckpoint,
                                                  userCredentials, eventAppeared, liveProcessingStarted,
                                                  subscriptionDropped, settings);
     catchUpSubscription.Start();
     return catchUpSubscription;
 }
コード例 #4
0
 public EventStoreAllCatchUpSubscription SubscribeToAllFrom(
     Position? lastCheckpoint,
     bool resolveLinkTos,
     Action<EventStoreCatchUpSubscription, ResolvedEvent> eventAppeared,
     Action<EventStoreCatchUpSubscription> liveProcessingStarted = null,
     Action<EventStoreCatchUpSubscription, SubscriptionDropReason, Exception> subscriptionDropped = null,
     UserCredentials userCredentials = null,
     int readBatchSize = 500)
 {
     Ensure.NotNull(eventAppeared, "eventAppeared");
     var catchUpSubscription =
         new EventStoreAllCatchUpSubscription(this, _settings.Log, lastCheckpoint, resolveLinkTos,
             GetUserCredentials(_settings, userCredentials), eventAppeared, liveProcessingStarted,
             subscriptionDropped, _settings.VerboseLogging, readBatchSize);
     catchUpSubscription.Start();
     return catchUpSubscription;
 }
コード例 #5
0
 public void Start()
 {
     _subscription = _connection.SubscribeToAllFrom(Position.Start, true, EventAppeared);
     _subscription.Start();
 }