TfsBackgroundWorkerManagerExtensions.RunAsync 方法 (TfsBackgroundWorkerManager, Action, TfsBackgroundWorkerPriority, CancellationToken)

命名空间:  Microsoft.TeamFoundation.Threading
程序集:  Microsoft.TeamFoundation.Controls(在 Microsoft.TeamFoundation.Controls.dll 中)

语法

声明
<ExtensionAttribute> _
Public Shared Function RunAsync ( _
    backgroundWorkerManager As TfsBackgroundWorkerManager, _
    action As Action, _
    priority As TfsBackgroundWorkerPriority, _
    cancellationToken As CancellationToken _
) As Task
public static Task RunAsync(
    this TfsBackgroundWorkerManager backgroundWorkerManager,
    Action action,
    TfsBackgroundWorkerPriority priority,
    CancellationToken cancellationToken
)

参数

返回值

类型:System.Threading.Tasks.Task

使用说明

在 Visual Basic 和 C# 中,可以在 TfsBackgroundWorkerManager 类型的任何对象上将此方法作为实例方法来调用。当使用实例方法语法调用此方法时,请省略第一个参数。有关更多信息,请参见扩展方法 (Visual Basic)扩展方法(C# 编程指南)

.NET Framework 安全性

请参见

参考

TfsBackgroundWorkerManagerExtensions 类

RunAsync 重载

Microsoft.TeamFoundation.Threading 命名空间