Beispiel #1
0
 /// <summary>
 /// Preserves state associated with this page in case the application is suspended or the
 /// page is discarded from the navigation cache.  Values must conform to the serialization
 /// requirements of <see cref="SuspensionManager.SessionState"/>.
 /// </summary>
 /// <param name="sender">The source of the event; typically <see cref="NavigationHelper"/></param>
 /// <param name="e">Event data that provides an empty dictionary to be populated with
 /// serializable state.</param>
 protected override async void navigationHelper_SaveState(object sender, SaveStateEventArgs e)
 {
     if (this.subscription != null)
     {
         await App.Current.Client.Unsubscribe(this.subscription);
         this.subscription = null;
     }
 }
Beispiel #2
0
 protected override async void navigationHelper_SaveState(object sender, SaveStateEventArgs e)
 {
     if (this.subscriptions != null)
     {
         foreach (var subscription in this.subscriptions)
         {
             await App.Current.Client.Unsubscribe(subscription);
         }
         this.subscriptions.Clear();
     }
 }
Beispiel #3
0
 protected override void navigationHelper_SaveState(object sender, SaveStateEventArgs e)
 {
 }