Exemplo n.º 1
0
 /// <inheritdoc/>
 public NavigationRequest GoBack()
 {
     if (CurrentLayer.CanGoBack)
     {
         var req = CurrentLayer.GoBack();
         requestStream.EmitValue(req);
         return(req);
     }
     else if (layers.Count > 1 && CurrentLayer.IsReturnable)
     {
         layers.RemoveAt(layers.Count - 1);
         var req = NavigationRequest.Close;
         requestStream.EmitValue(req);
         return(req);
     }
     else
     {
         throw new InvalidOperationException("The current state of the NavigationHistory does not support back navigation.");
     }
 }