Beispiel #1
0
        protected override IObservable <IView> PresentView(object input, Options options = null)
        {
            options = options.With(VariantProvider.GetVariantsNamed(Variants));

            return(Observable
                   .Defer(() => StartPushAndLoadView(input, options))
                   .ContinueWith(NavigateAndCompletePush));
        }
        protected override IObservable <IView> PresentView(object input, Options options = null)
        {
            MutableState.Value = PresenterState.Loading;

            // If input is observable, resolve it first
            var observable = input as IObservable <object>;

            if (observable != null)
            {
                return(observable.ContinueWith(x => PresentView(x, options)));
            }

            options = options.With(VariantProvider.GetVariantsNamed(Variants));

            return(Observable.Defer(() => PresentInternal(input, options)));
        }
Beispiel #3
0
        protected override IObservable <IView> PresentView(object input, Options options = null)
        {
            options = options.With(VariantProvider.GetVariantsNamed(Variants));

            if (MutableState.Value == PresenterState.Ready)
            {
                return(PresentNow(input, options));
            }

            if (MutableState.Value == PresenterState.Loading)
            {
                CancelLoading();
                return(PresentNow(input, options));
            }

            // PresenterState.Presenting
            return(PresentLater(input, options));
        }