SuspendingOperation
SuspendingOperation
SuspendingOperation
SuspendingOperation
Class
Definition
Manages an app suspension operation.
public : sealed class SuspendingOperation : ISuspendingOperationpublic sealed class SuspendingOperation : ISuspendingOperationPublic NotInheritable Class SuspendingOperation Implements ISuspendingOperation// You can use this class in JavaScript.
- Attributes
| 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// You can use this property in JavaScript.
- 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// You can use this method in JavaScript.
The suspension deferral.
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