SuspendingOperation SuspendingOperation SuspendingOperation SuspendingOperation SuspendingOperation Class


Manages an app suspension operation.

public : sealed class SuspendingOperation : ISuspendingOperation
struct winrt::Windows::UI::WebUI::SuspendingOperation : ISuspendingOperation
public sealed class SuspendingOperation : ISuspendingOperation
Public NotInheritable Class SuspendingOperation Implements ISuspendingOperation
// This class does not provide a public constructor.
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


Use the SuspendingEventArgs.suspendingOperation property to get the object.


: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX)



Deadline Deadline Deadline Deadline Deadline

Gets the time remaining before a delayed app suspension operation continues.

public : DateTime Deadline { get; }
DateTime Deadline();
public DateTimeOffset Deadline { get; }
Public ReadOnly Property Deadline As DateTimeOffset
var dateTimeOffset = suspendingOperation.deadline;
DateTimeOffset DateTimeOffset DateTimeOffset

The time remaining.

See Also


GetDeferral() GetDeferral() GetDeferral() GetDeferral() GetDeferral()

Requests that the app suspension operation be delayed.

public : SuspendingDeferral GetDeferral()
SuspendingDeferral GetDeferral() const;
public SuspendingDeferral GetDeferral()
Public Function GetDeferral() As SuspendingDeferral
var suspendingDeferral = suspendingOperation.getDeferral();


App suspension is delayed until the app calls the SuspendingDeferral.complete method or the deadline for suspension has passed.

Use the deferral to complete asynchronous operations, such as saving data to a file, before the system suspends your app.

Note that requesting a deferral does not give your app more time to complete suspend, it simply allows you to complete asynchronous operations in the same amount of time that your app would normally get in the suspending event handler.

See Also

See Also