Edit

Share via


BackgroundTaskHelper Class

Definition

This class provides static helper methods for background tasks.

public static class BackgroundTaskHelper
type BackgroundTaskHelper = class
Public Class BackgroundTaskHelper
Inheritance
BackgroundTaskHelper

Methods

GetBackgroundTask(String)

Returns the registered background task of the given type.

GetBackgroundTask(Type)

Returns the registered background task of the given type.

IsBackgroundTaskRegistered(String)

Determines whether a background task is registered.

IsBackgroundTaskRegistered(Type)

Determines whether a background task is registered.

Register(String, IBackgroundTrigger, Boolean, Boolean, IBackgroundCondition[])

Registers under the Single Process Model. WARNING: Single Process Model only works with Windows 10 Anniversary Update (14393) and later. Registers a background task with conditions. If the task is already registered and has the same trigger, returns the existing registration if it has the same trigger. If the task is already registered but has different trigger, return null by default. Or set forceRegister to true to un-register the old one and then re-register.

Register(String, String, IBackgroundTrigger, Boolean, Boolean, IBackgroundCondition[])

Registers a background task with conditions. If the task is already registered, return null. Or set forceRegister to true to un-register the old one and then re-register.

Register(Type, IBackgroundTrigger, Boolean, Boolean, IBackgroundCondition[])

Registers a background task with conditions. If the task is already registered and has the same trigger, returns the existing registration if it has the same trigger. If the task is already registered but has different trigger, return null by default. Or set forceRegister to true to un-register the old one and then re-register.

Unregister(IBackgroundTaskRegistration, Boolean)

Unregisters a background task.

Unregister(String, Boolean)

Unregisters a background task.

Unregister(Type, Boolean)

Unregisters a background task.

Applies to