Click or drag to resize

JavaScriptExtensions Class

Defines extension methods for use with JavaScript engines.
Inheritance Hierarchy
SystemObject
  Microsoft.ClearScript.JavaScriptJavaScriptExtensions

Namespace: Microsoft.ClearScript.JavaScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.5
Syntax
public static class JavaScriptExtensions

The JavaScriptExtensions type exposes the following members.

Methods
 NameDescription
Public Extension MethodToAsyncEnumerable Supports managed asynchronous iteration over an async-iterable script object.
Public Extension MethodToEnumerable Supports managed iteration over an iterable script object.
Public Extension MethodToPromise(Task) Converts a Task instance to a promise for use with script code currently running on the calling thread.
Public Extension MethodToPromise(ValueTask) Converts a ValueTask instance to a promise for use with script code currently running on the calling thread.
Public Extension MethodToPromise(Task, ScriptEngine) Converts a Task instance to a promise for use with script code running in the specified script engine.
Public Extension MethodToPromise(ValueTask, ScriptEngine) Converts a ValueTask instance to a promise for use with script code running in the specified script engine.
Public Extension MethodToPromiseT(TaskT) Converts a TaskTResult instance to a promise for use with script code currently running on the calling thread.
Public Extension MethodToPromiseT(ValueTaskT) Converts a ValueTaskTResult instance to a promise for use with script code currently running on the calling thread.
Public Extension MethodToPromiseT(TaskT, ScriptEngine) Converts a TaskTResult instance to a promise for use with script code running in the specified script engine.
Public Extension MethodToPromiseT(ValueTaskT, ScriptEngine) Converts a ValueTaskTResult instance to a promise for use with script code running in the specified script engine.
Public Extension MethodToTask Converts a promise to a Task<Object> instance.
Top
See Also