diff options
-rw-r--r-- | Source/Windows10/Prism.Windows/PrismApplication.cs | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/Source/Windows10/Prism.Windows/PrismApplication.cs b/Source/Windows10/Prism.Windows/PrismApplication.cs index 644c5ae..efabcde 100644 --- a/Source/Windows10/Prism.Windows/PrismApplication.cs +++ b/Source/Windows10/Prism.Windows/PrismApplication.cs @@ -520,32 +520,32 @@ namespace Prism.Windows /// <param name="sender">The source of the suspend request.</param> /// <param name="e">Details about the suspend request.</param> private async void OnSuspending(object sender, SuspendingEventArgs e) - { - IsSuspending = true; - try - { - var deferral = e.SuspendingOperation.GetDeferral(); - - //Custom calls before suspending. - await OnSuspendingApplicationAsync(); - - //Bootstrap inform navigation service that app is suspending. - NavigationService?.Suspending(); - - // Save application state - var saveAsync = SessionStateService?.SaveAsync(); - if (saveAsync != null) - { - await saveAsync; - } - - deferral.Complete(); - } - finally - { - IsSuspending = false; - } - } + { + IsSuspending = true; + try + { + var deferral = e.SuspendingOperation.GetDeferral(); + + //Custom calls before suspending. + await OnSuspendingApplicationAsync(); + + //Bootstrap inform navigation service that app is suspending. + NavigationService?.Suspending(); + + // Save application state + var saveAsync = SessionStateService?.SaveAsync(); + if (saveAsync != null) + { + await saveAsync; + } + + deferral.Complete(); + } + finally + { + IsSuspending = false; + } + } /// <summary> /// Invoked when the application resumes from a suspended state. |