BackgroundTaskCancellationReason Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the reasons for cancelling a background task.
public enum class BackgroundTaskCancellationReason
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class BackgroundTaskCancellationReason
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum BackgroundTaskCancellationReason
var value = Windows.ApplicationModel.Background.BackgroundTaskCancellationReason.abort
Public Enum BackgroundTaskCancellationReason
- Inheritance
-
BackgroundTaskCancellationReason
- Attributes
Windows requirements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
Fields
Name | Value | Description |
---|---|---|
Abort | 0 | The background task was canceled by the application. This can happen for one of the following four reasons:
|
Terminating | 1 | The background task was canceled because the application is about to be terminated due to system policy. The application should save any state that will be needed when the application restarts. |
LoggingOff | 2 | The background task was canceled because the user has logged off the system. |
ServicingUpdate | 3 | The background task was canceled because the application was updated. |
IdleTask | 4 | The background task was canceled because it was active, but not doing any work. |
Uninstall | 5 | The background task was canceled because the application was uninstalled. |
ConditionLoss | 6 | The background task was canceled because one or more of its required conditions is no longer met. |
SystemPolicy | 7 | The background task was cancelled because of system policy. |
QuietHoursEntered | 8 | The background task was cancelled because the device entered the quiet hours period. Note QuietHoursEntered is no longer available for use as of Windows 10. |
ExecutionTimeExceeded | 9 | The background task was cancelled because it exceeded its allotted time to run. |
ResourceRevocation | 10 | The background task was cancelled because the system needed additional resources. The background task was cancelled to free up those resources. |
EnergySaver | 11 | The background task was cancelled because of the current Energy Saver policy. |