JavaScriptExtensionsToPromiseT(ValueTaskT, ScriptEngine) Method |
Namespace: Microsoft.ClearScript.JavaScriptAssembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.5
Syntax public static Object ToPromise<T>(
this ValueTask<T> valueTask,
ScriptEngine engine
)
<ExtensionAttribute>
Public Shared Function ToPromise(Of T) (
valueTask As ValueTask(Of T),
engine As ScriptEngine
) As Object
public:
[ExtensionAttribute]
generic<typename T>
static Object^ ToPromise(
ValueTask<T> valueTask,
ScriptEngine^ engine
)
[<ExtensionAttribute>]
static member ToPromise :
valueTask : ValueTask<'T> *
engine : ScriptEngine -> Object
Parameters
- valueTask ValueTaskT
- The task to convert to a promise.
- engine ScriptEngine
- The script engine in which the promise will be used.
Type Parameters
- T
- The task's result type.
Return Value
ObjectA promise that represents the task's asynchronous operation.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ValueTaskT. 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).
Remarks
This method is not available on .NET Framework or Universal Windows Platform (UWP).
See Also