Partager via


CancellableTaskStatusQuery.QueryStatus Method (CancellationToken)

 

When overridden in a derived class, queries for the status of a cancellable task.

Namespace:   Microsoft.WindowsServerSolutions.Dashboard.Addins.Home
Assembly:  HomeAddinContract (in HomeAddinContract.dll)

Syntax

protected abstract TaskQuickStatus QueryStatus(
    CancellationToken cancellationToken
)
protected:
virtual TaskQuickStatus^ QueryStatus(
    CancellationToken cancellationToken
) abstract
Protected MustOverride Function QueryStatus (
    cancellationToken As CancellationToken
) As TaskQuickStatus

Parameters

Return Value

Type: Microsoft.WindowsServerSolutions.Dashboard.Addins.Home.TaskQuickStatus

A TaskQuickStatus. If the status is unavailable, the return value is null, and the status may be displayed as N/A.

Remarks

The method implementation must check the cancellationToken parameter at each moment that the task can be canceled. The CancellationToken.ThrowIfCancellationRequested method can be used to indicate the task has been canceled.

See Also

CancellableTaskStatusQuery Class
Microsoft.WindowsServerSolutions.Dashboard.Addins.Home Namespace

Return to top