예제 #1
0
        private async Task SetConnectionLostState()
        {
            var state = await connectionStateSubject.FirstAsync();

            if (state == Enums.ConnectionState.ConnectionLost)
            {
                return;
            }

            connectionStateSubject.OnNext(Enums.ConnectionState.ConnectionLost);
        }
예제 #2
0
 /// <summary>
 /// Returns the top modal from the current modal stack.
 /// </summary>
 /// <returns></returns>
 /// <exception cref="NotImplementedException"></exception>
 public IObservable <IPageViewModel> TopModal() => _modalStack.FirstAsync().Select(x => x.Last());
예제 #3
0
 /// <summary>
 /// Returns the top page from the current navigation stack.
 /// </summary>
 /// <returns></returns>
 /// <exception cref="NotImplementedException"></exception>
 public IObservable <IPageViewModel> TopPage() => _pageStack.FirstAsync().Select(x => x.Last());
예제 #4
0
 /// <summary>
 /// Returns the top page from the current navigation stack.
 /// </summary>
 /// <returns>An observable that signals the top page view model.</returns>
 public IObservable <IViewModel> TopPage() => _navigationSubject.FirstAsync().Select(x => x[x.Count - 1]);
예제 #5
0
 /// <summary>
 /// Returns the top modal from the current modal stack.
 /// </summary>
 /// <returns>An observable that signals the top modal view model.</returns>
 public IObservable <IViewModel> TopModal() => _modalSubject.FirstAsync().Select(x => x[x.Count - 1]);