BallsGame.App.OnSuspending C# (CSharp) Method

OnSuspending() private method

Invoked when application execution is being suspended. Application state is saved without knowing whether the application will be terminated or resumed with the contents of memory still intact.
private OnSuspending ( object sender, SuspendingEventArgs e ) : void
sender object The source of the suspend request.
e Windows.ApplicationModel.SuspendingEventArgs Details about the suspend request.
return void
        private void OnSuspending(object sender, SuspendingEventArgs e)
        {
            var deferral = e.SuspendingOperation.GetDeferral();
              //TODO: Save application state and stop any background activity
              deferral.Complete();
        }