OnTransitioningToInternalAsync() private method

private OnTransitioningToInternalAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        private async Task TransitionBackward(
            AlternativePage currentPage,
            AlternativePage newPage,
            ContentPresenter previousPagePresenter,
            ContentPresenter newPagePresenter)
        {
            var transition = currentPage != null ? (currentPage.PageTransition ?? this.PageTransition) : this.PageTransition;

            if (transition != null)
            {
                if (currentPage != null)
                {
                    await currentPage.OnTransitioningFromInternalAsync();
                }

                if (newPage != null)
                {
                    await newPage.OnTransitioningToInternalAsync();
                }

                await transition.TransitionBackward(previousPagePresenter, newPagePresenter);

                if (currentPage != null)
                {
                    await currentPage.OnTransitionedFromInternalAsync();
                }

                if (newPage != null)
                {
                    await newPage.OnTransitionedToInternalAsync();
                }
            }
        }
        private async Task TransitionBackwardAsync(
            AlternativePage currentPage,
            AlternativePage newPage,
            ContentPresenter previousPagePresenter,
            ContentPresenter newPagePresenter)
        {
            var transition = currentPage != null ? (currentPage.PageTransition ?? this.PageTransition) : this.PageTransition;

            if (transition != null)
            {
                if (currentPage != null)
                {
                    await currentPage.OnTransitioningFromInternalAsync();
                }

                if (newPage != null)
                {
                    await newPage.OnTransitioningToInternalAsync();
                }

                await transition.TransitionBackwardAsync(previousPagePresenter, newPagePresenter);

                if (currentPage != null)
                {
                    await currentPage.OnTransitionedFromInternalAsync();
                }

                if (newPage != null)
                {
                    await newPage.OnTransitionedToInternalAsync();
                }
            }
        }