SuspendingOperation SuspendingOperation SuspendingOperation SuspendingOperation Class

Definition

Manages an app suspension operation.

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

Remarks

Use the SuspendingEventArgs.suspendingOperation property to get the object.

Note

: 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)

.

Properties

Deadline Deadline Deadline Deadline

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

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

The time remaining.

See Also

Methods

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

Requests that the app suspension operation be delayed.

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

Remarks

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