VsTaskLibraryHelper.RunAsync Method (JoinableTaskFactory, VsTaskRunContext, Func<Task>)
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function RunAsync ( _
joinableTaskFactory As JoinableTaskFactory, _
priority As VsTaskRunContext, _
asyncMethod As Func(Of Task) _
) As JoinableTask
public static JoinableTask RunAsync(
this JoinableTaskFactory joinableTaskFactory,
VsTaskRunContext priority,
Func<Task> asyncMethod
)
[ExtensionAttribute]
public:
static JoinableTask^ RunAsync(
JoinableTaskFactory^ joinableTaskFactory,
VsTaskRunContext priority,
Func<Task^>^ asyncMethod
)
static member RunAsync :
joinableTaskFactory:JoinableTaskFactory *
priority:VsTaskRunContext *
asyncMethod:Func<Task> -> JoinableTask
public static function RunAsync(
joinableTaskFactory : JoinableTaskFactory,
priority : VsTaskRunContext,
asyncMethod : Func<Task>
) : JoinableTask
Parameters
- joinableTaskFactory
Type: Microsoft.VisualStudio.Threading.JoinableTaskFactory
- priority
Type: Microsoft.VisualStudio.Shell.VsTaskRunContext
- asyncMethod
Type: Func<Task>
Return Value
Type: Microsoft.VisualStudio.Threading.JoinableTask
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type JoinableTaskFactory. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.