public Task OnErrorAsync(Immutable <IEventSubscription> subscription, Immutable <Exception> exception)
        {
            if (subscription.Value != currentSubscription)
            {
                return(TaskHelper.Done);
            }

            return(DoAndUpdateStateAsync(() =>
            {
                Unsubscribe();

                state = state.Failed(exception.Value);
            }));
        }
        private Task HandleErrorAsync(IEventSubscription subscription, Exception exception)
        {
            if (subscription != currentSubscription)
            {
                return(TaskHelper.Done);
            }

            return(DoAndUpdateStateAsync(() =>
            {
                Unsubscribe();

                state = state.Failed(exception);
            }));
        }