I​Background​Task​Registration I​Background​Task​Registration I​Background​Task​Registration Interface

Definition

Provides access to a registered background task.

public : interface IBackgroundTaskRegistrationpublic interface IBackgroundTaskRegistrationPublic Interface IBackgroundTaskRegistration
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

Name Name Name

Gets the name of a registered background task.

public : PlatForm::String Name { get; }public string Name { get; }Public ReadOnly Property Name As string
Value
PlatForm::String string string

The description specified with BackgroundTaskBuilder.Name when the task was created.

Attributes

TaskId TaskId TaskId

Gets the identifier of a registered background task.

public : PlatForm::Guid TaskId { get; }public Guid TaskId { get; }Public ReadOnly Property TaskId As Guid
Value
PlatForm::Guid Guid Guid

The unique identifier for the task. This identifier is generated by the system when the task is registered.

Attributes

Methods

Unregister(Boolean) Unregister(Boolean) Unregister(Boolean)

Unregisters a registered background task.

public : void Unregister(bool cancelTask)public void Unregister(Boolean cancelTask)Public Function Unregister(cancelTask As Boolean) As void
Parameters
cancelTask
bool Boolean Boolean

True if currently running instances of this background task should be canceled. If this parameter is false, currently running instances of this background task should be allowed to finish. Canceled instances receive a Canceled event with a BackgroundTaskCancellationReason of Abort.

Attributes

Events

Completed Completed Completed

Attaches a completed event handler to the registered background task.

public : abstract event BackgroundTaskCompletedEventHandler Completedpublic abstract event BackgroundTaskCompletedEventHandler CompletedPublic MustInherit Event Completed
Attributes

Progress Progress Progress

Attaches a progress event handler to the registered background task.

public : abstract event BackgroundTaskProgressEventHandler Progresspublic abstract event BackgroundTaskProgressEventHandler ProgressPublic MustInherit Event Progress
Attributes