コード例 #1
0
        private IObservable <IView> PopInternal(IView view, List <IView> history)
        {
            AssertCanPresent(null, null);

            StartChange();

            var options = new Options {
                Direction = Direction.Backward
            };
            var presentation = CreatePresentation(null, _view.Value, view?.GetType(), options);

            presentation.TargetView = view;
            var nav = StartNavigation(presentation);

            return(Completable
                   .WhenAll(
                       PerformTransition(presentation),
                       nav.Parallel)
                   .DoOnCompleted(() =>
            {
                History.Value = history;
                CompleteNavigation(nav);
                CompleteChange(nav);
            })
                   .ThenReturn(view));
        }
コード例 #2
0
        private IObservable <IView> NavigateAndCompletePush(Presentation presentation)
        {
            var nav = StartNavigation(presentation);

            return(Completable
                   .WhenAll(
                       Present(presentation),
                       nav.Parallel)
                   .DoOnCompleted(() =>
            {
                History.Value = GetNewHistory(presentation.TargetView, presentation.Options.GetPushModeOrDefault());
                CompleteNavigation(nav);
            })
                   .ThenReturn(presentation.TargetView));
        }