IWebUIBackgroundTaskInstance IWebUIBackgroundTaskInstance IWebUIBackgroundTaskInstance IWebUIBackgroundTaskInstance Interface

Provides access to an instance of a background task.

Note

Once the background task sets this property and has therefore completed its work, the task must explicitly call the Web Workers close method to terminate itself.

Syntax

Declaration

public interface IWebUIBackgroundTaskInstancepublic interface IWebUIBackgroundTaskInstancePublic Interface IWebUIBackgroundTaskInstancepublic interface IWebUIBackgroundTaskInstance

Properties summary

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.

Properties

  • Succeeded
    Succeeded
    Succeeded
    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.

    public bool Succeeded { get; set; }public bool Succeeded { get; set; }Public ReadWrite Property Succeeded As boolpublic bool Succeeded { get; set; }

    Property Value

    • bool
      bool
      bool
      bool

      An app can set this property to false to indicate that the background task has failed. Otherwise this property is always true.

    Remarks

    An app can set this property to false to indicate that the background task has failed. Otherwise this property is always true. The foreground instance of your app can check if the task succeeded using the Completed event. The CheckResult() method on the event args will throw an exception if the succeeded property is set to false.

    Note

    Once the background task sets this property and has therefore completed its work, the task must explicitly call the Web Workers close method to terminate itself.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.GuidAttribute

Details

Assembly

Windows.UI.WebUI.dll