public async Task Interface_contract_changes_can_be_detected()
        {
            var ct        = CancellationToken.None;
            var navigator = new BlindSectionsNavigator("Section1", "Section2");

            // If the core contract changes, we get compilation errors here.
            ISectionStackNavigator sectionNavigator = await navigator.SetActiveSection(ct, SectionsNavigatorRequest.GetSetActiveSectionRequest("Section1"));

            IModalStackNavigator modalNavigator = await navigator.OpenModal(ct, SectionsNavigatorRequest.GetOpenModalRequest(StackNavigation.StackNavigatorRequest.GetNavigateRequest(() => new TestVM()), "modalName", 0));

            await navigator.CloseModal(ct, SectionsNavigatorRequest.GetCloseModalRequest("modalName", 0));
        }
예제 #2
0
        public async Task Interface_contract_changes_can_be_detected()
        {
            var ct = CancellationToken.None;
            var sectionsNavigator = new BlindSectionsNavigator("Section1", "Section2");

            // If the core contract changes, we get compilation errors here.
            IModalStackNavigator navigator = await sectionsNavigator.OpenModal(ct, SectionsNavigatorRequest.GetOpenModalRequest(StackNavigation.StackNavigatorRequest.GetNavigateRequest(() => new TestVM()), "modalName", 0));

            // Make sure IModalStackNavigator inherits from IStackNavigator
            StackNavigation.IStackNavigator stackNavigator = navigator;

            Assert.Equal("modalName", navigator.Name);
            Assert.Equal(0, navigator.Priority);
        }
 /// <inheritdoc cref="StackNavigatorExtensions.TryNavigateBackTo{TPageViewModel}(IStackNavigator, CancellationToken)"/>
 public static Task <bool> TryNavigateBackTo <TPageViewModel>(this IModalStackNavigator stackNavigator, CancellationToken ct)
 {
     return(StackNavigatorExtensions.TryNavigateBackTo <TPageViewModel>(stackNavigator, ct));
 }
 /// <inheritdoc cref="StackNavigatorExtensions.GetActiveViewModel(IStackNavigator)"/>
 public static INavigableViewModel GetActiveViewModel(this IModalStackNavigator stackNavigator)
 {
     return(StackNavigatorExtensions.GetActiveViewModel(stackNavigator));
 }
 /// <inheritdoc cref="StackNavigatorExtensions.RemovePrevious(IStackNavigator, CancellationToken)"/>
 public static Task RemovePrevious(this IModalStackNavigator stackNavigator, CancellationToken ct)
 {
     return(StackNavigatorExtensions.RemovePrevious(stackNavigator, ct));
 }
 /// <inheritdoc cref="StackNavigatorExtensions.Navigate{TViewModel}(IStackNavigator, CancellationToken, Func{TViewModel}, bool)"/>
 public static Task <TViewModel> Navigate <TViewModel>(this IModalStackNavigator stackNavigator, CancellationToken ct, Func <TViewModel> viewModelProvider, bool suppressTransition = false)
     where TViewModel : INavigableViewModel
 {
     return(StackNavigatorExtensions.Navigate(stackNavigator, ct, viewModelProvider, suppressTransition));
 }
 /// <inheritdoc cref="StackNavigatorExtensions.ProcessRequest(IStackNavigator, CancellationToken, StackNavigatorRequest)"/>
 public static Task ProcessRequest(this IModalStackNavigator stackNavigator, CancellationToken ct, StackNavigatorRequest request)
 {
     return(StackNavigatorExtensions.ProcessRequest(stackNavigator, ct, request));
 }
 /// <inheritdoc cref="StackNavigatorExtensions.CanNavigateBack(IStackNavigator)"/>
 public static bool CanNavigateBack(this IModalStackNavigator stackNavigator)
 {
     return(StackNavigatorExtensions.CanNavigateBack(stackNavigator));
 }
 /// <inheritdoc/>
 protected override Task InnerCloseModal(IModalStackNavigator modalToClose, SectionsTransitionInfo transitionInfo)
 {
     // Don't do anything.
     return(Task.CompletedTask);
 }
 /// <inheritdoc/>
 protected override Task InnerOpenModal(IModalStackNavigator navigator, bool isTopModal, SectionsTransitionInfo transitionInfo)
 {
     // Don't do anything.
     return(Task.CompletedTask);
 }
예제 #11
0
 /// <inheritdoc cref="StackNavigatorReactiveExtensions.ObserveCurrentState(IStackNavigator)"/>
 public static IObservable <StackNavigatorState> ObserveCurrentState(this IModalStackNavigator navigator)
 {
     return(StackNavigatorReactiveExtensions.ObserveCurrentState(navigator));
 }
예제 #12
0
 /// <inheritdoc cref="StackNavigatorReactiveExtensions.ObserveStateChanged(IStackNavigator)"/>
 public static IObservable <EventPattern <StackNavigatorEventArgs> > ObserveStateChanged(this IModalStackNavigator navigator)
 {
     return(StackNavigatorReactiveExtensions.ObserveStateChanged(navigator));
 }