BackgroundTaskBuilder class
TOC
Collapse the table of content
Expand the table of content

BackgroundTaskBuilder class

Represents a background task to be registered with the system.

Note  Starting in Windows 8.1, the parameters used to register the background task are validated at the time the task is registered. See the remarks for BackgroundTaskBuilder.Register.
 

Syntax


var backgroundTaskBuilder = new Windows.ApplicationModel.Background.BackgroundTaskBuilder();

Members

The BackgroundTaskBuilder class has these types of members:

Constructors

The BackgroundTaskBuilder class has these constructors.

ConstructorDescription
BackgroundTaskBuilder Creates an instance of the BackgroundTaskBuilder class.

 

Methods

The BackgroundTaskBuilder class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
AddCondition Adds a condition to a background task.
Register Registers a background task with the system.
SetTrigger Sets the event trigger for a background task.

 

Properties

The BackgroundTaskBuilder class has these properties.

PropertyAccess typeDescription

CancelOnConditionLoss

Read/write

Indicates whether the background task will be canceled if at least one of its required conditions is no longer met.

IsNetworkRequested

Read/write

Indicates whether the background task requires network connectivity in order to run.

Name

Read/write

Gets or sets the name of a background task.

TaskEntryPoint

Read/write

Gets or sets the class that performs the work of a background task.

 

Remarks

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) and Using Windows Runtime objects in a multithreaded environment (.NET).
 

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.ApplicationModel.Background
Windows::ApplicationModel::Background [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.ApplicationModel.Background
Windows::ApplicationModel::Background [C++]

Metadata

Windows.winmd

Attributes

[MarshalingBehavior(Standard)]
[Threading(MTA)]
[Version(0x06020000)]

See also

Object

 

 

Show:
© 2016 Microsoft