Udostępnij za pośrednictwem


WebUIBackgroundTaskInstanceRuntimeClass Class

Definition

Provides access to an instance of a background task.

Note

A background task must explicitly call the Web Workers close method to terminate itself after the task has completed.

public ref class WebUIBackgroundTaskInstanceRuntimeClass sealed : IBackgroundTaskInstance, IWebUIBackgroundTaskInstance
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
class WebUIBackgroundTaskInstanceRuntimeClass final : IBackgroundTaskInstance, IWebUIBackgroundTaskInstance
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
public sealed class WebUIBackgroundTaskInstanceRuntimeClass : IBackgroundTaskInstance, IWebUIBackgroundTaskInstance
Public NotInheritable Class WebUIBackgroundTaskInstanceRuntimeClass
Implements IBackgroundTaskInstance, IWebUIBackgroundTaskInstance
Inheritance
Object Platform::Object IInspectable WebUIBackgroundTaskInstanceRuntimeClass
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

To retrieve this object, use the WebUIBackgroundTaskInstance.current property.

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

InstanceId

Gets the instance ID of the background task instance.

Progress

Gets or sets progress status for a background task instance.

Succeeded

Gets or sets the success value for the background task. The success value is what is returned to the foreground instance of your app in the completed event.

SuspendedCount

Gets the number of times resource management policy caused the background task to be suspended.

Task

Gets access to the registered background task for this background task instance.

TriggerDetails

Gets additional information associated with a background task instance.

Methods

GetDeferral()

Informs the system that the background task might continue to perform work after the IBackgroundTask.Run method returns. This method is not applicable to JavaScript background tasks.

Events

Canceled

Attaches a cancellation event handler to the background task instance.

Applies to