Example #1
0
        internal async Task <EventStorePersistentSubscriptionBase> Start()
        {
            _stopped.Reset();

            _subscription = await StartSubscription(_subscriptionId, _streamId, _bufferSize, _userCredentials,
                                                    OnEventAppeared,
                                                    OnSubscriptionDropped, _settings).ConfigureAwait(false);

            return(this);
        }
        internal void Start()
        {
            _stopped.Reset();

            var task = StartSubscription(_subscriptionId, _streamId, _bufferSize, _userCredentials, OnEventAppeared,
                                         OnSubscriptionDropped, _settings);

            task.Wait();

            _subscription = task.Result;
        }
        internal void Start()
        {
            _stopped.Reset();

            var task = StartSubscription(_subscriptionId, _streamId, _bufferSize, _userCredentials, OnEventAppeared,
                OnSubscriptionDropped, _settings);
            
            task.Wait();
            
            _subscription = task.Result;
        }
        internal Task <EventStorePersistentSubscriptionBase> Start()
        {
            _stopped.Reset();

            var task = StartSubscription(_subscriptionId, _streamId, _bufferSize, _userCredentials, OnEventAppeared,
                                         OnSubscriptionDropped, _settings).ContinueWith(t => {
                _subscription = t.Result;
                return(this);
            });

            return(task);
        }
        internal Task<EventStorePersistentSubscriptionBase> Start()
        {
            _stopped.Reset();

            var task = StartSubscription(_subscriptionId, _streamId, _bufferSize, _userCredentials, OnEventAppeared,
                OnSubscriptionDropped, _settings).ContinueWith(t =>
                {
                    _subscription = t.Result;
                    return this;
                });

            return task;
        }