Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Runs the specified asynchronous method.
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
Public Function Run(Of T) ( _
asyncMethod As Func(Of Task(Of T)) _
) As T
public T Run<T>(
Func<Task<T>> asyncMethod
)
public:
generic<typename T>
T Run(
Func<Task<T>^>^ asyncMethod
)
member Run :
asyncMethod:Func<Task<'T>> -> 'T
JScript does not support generic types or methods.
Type Parameters
- T
The type of value returned by the asynchronous method.
Parameters
asyncMethod
Type: System.Func<Task<T>>The asynchronous method to execute.
Return Value
Type: T
The value returned by the asynchronous method.
.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.