1 instantiation of JSObject
System.Runtime.InteropServices.JavaScript (1)
System\Runtime\InteropServices\JavaScript\JSProxyContext.cs (1)
466
res = new
JSObject
(jsHandle, this);
139 references to JSObject
System.Net.WebSockets.Client (24)
_generated\0\JSImports.g.cs (8)
7
public static partial int WebSocketGetState(global::System.Runtime.InteropServices.JavaScript.
JSObject
webSocket)
54
public static partial global::System.Runtime.InteropServices.JavaScript.
JSObject
WebSocketCreate(string uri, string[] subProtocols, nint responseStatusPtr)
67
global::System.Runtime.InteropServices.JavaScript.
JSObject
__retVal;
107
public static partial global::System.Threading.Tasks.Task WebSocketOpen(global::System.Runtime.InteropServices.JavaScript.
JSObject
webSocket)
154
public static partial global::System.Threading.Tasks.Task WebSocketSend(global::System.Runtime.InteropServices.JavaScript.
JSObject
webSocket, nint bufferPtr, int bufferLength, int messageType, bool endOfMessage)
213
public static partial global::System.Threading.Tasks.Task WebSocketReceive(global::System.Runtime.InteropServices.JavaScript.
JSObject
webSocket, nint bufferPtr, int bufferLength)
266
public static partial global::System.Threading.Tasks.Task WebSocketClose(global::System.Runtime.InteropServices.JavaScript.
JSObject
webSocket, int code, string reason, bool waitForCloseReceived)
322
public static partial void WebSocketAbort(global::System.Runtime.InteropServices.JavaScript.
JSObject
webSocket)
System\Net\WebSockets\BrowserWebSockets\BrowserInterop.cs (14)
12
public static string? GetProtocol(
JSObject
? webSocket)
23
public static WebSocketCloseStatus? GetCloseStatus(
JSObject
? webSocket)
38
public static string? GetCloseStatusDescription(
JSObject
? webSocket)
49
public static int GetReadyState(
JSObject
? webSocket)
61
JSObject
webSocket);
64
public static partial
JSObject
WebSocketCreate(
69
public static unsafe
JSObject
UnsafeCreate(
79
JSObject
webSocket);
83
JSObject
webSocket,
89
public static unsafe Task? UnsafeSend(
JSObject
jsWs, MemoryHandle pinBuffer, int length, WebSocketMessageType messageType, bool endOfMessage)
96
JSObject
webSocket,
100
public static unsafe Task? ReceiveUnsafe(
JSObject
jsWs, MemoryHandle pinBuffer, int length)
107
JSObject
webSocket,
114
JSObject
webSocket);
System\Net\WebSockets\BrowserWebSockets\BrowserWebSocket.cs (2)
21
private
JSObject
? _innerWebSocket;
641
private static WebSocketState GetReadyStateLocked(
JSObject
innerWebSocket)
System.Runtime.InteropServices.JavaScript (115)
_generated\0\JSImports.g.cs (24)
7
public static partial bool HasProperty(global::System.Runtime.InteropServices.JavaScript.
JSObject
self, string propertyName)
57
public static partial string GetTypeOfProperty(global::System.Runtime.InteropServices.JavaScript.
JSObject
self, string propertyName)
107
public static partial bool GetPropertyAsBoolean(global::System.Runtime.InteropServices.JavaScript.
JSObject
self, string propertyName)
157
public static partial int GetPropertyAsInt32(global::System.Runtime.InteropServices.JavaScript.
JSObject
self, string propertyName)
207
public static partial double GetPropertyAsDouble(global::System.Runtime.InteropServices.JavaScript.
JSObject
self, string propertyName)
257
public static partial string GetPropertyAsString(global::System.Runtime.InteropServices.JavaScript.
JSObject
self, string propertyName)
307
public static partial global::System.Runtime.InteropServices.JavaScript.
JSObject
GetPropertyAsJSObject(global::System.Runtime.InteropServices.JavaScript.
JSObject
self, string propertyName)
319
global::System.Runtime.InteropServices.JavaScript.
JSObject
__retVal;
357
public static partial byte[] GetPropertyAsByteArray(global::System.Runtime.InteropServices.JavaScript.
JSObject
self, string propertyName)
407
public static partial void SetPropertyBool(global::System.Runtime.InteropServices.JavaScript.
JSObject
self, string propertyName, bool value)
452
public static partial void SetPropertyInt(global::System.Runtime.InteropServices.JavaScript.
JSObject
self, string propertyName, int value)
497
public static partial void SetPropertyDouble(global::System.Runtime.InteropServices.JavaScript.
JSObject
self, string propertyName, double value)
542
public static partial void SetPropertyString(global::System.Runtime.InteropServices.JavaScript.
JSObject
self, string propertyName, string value)
587
public static partial void SetPropertyJSObject(global::System.Runtime.InteropServices.JavaScript.
JSObject
self, string propertyName, global::System.Runtime.InteropServices.JavaScript.
JSObject
value)
632
public static partial void SetPropertyBytes(global::System.Runtime.InteropServices.JavaScript.
JSObject
self, string propertyName, byte[] value)
677
public static partial global::System.Runtime.InteropServices.JavaScript.
JSObject
GetGlobalThis()
687
global::System.Runtime.InteropServices.JavaScript.
JSObject
__retVal;
720
public static partial global::System.Runtime.InteropServices.JavaScript.
JSObject
GetDotnetInstance()
730
global::System.Runtime.InteropServices.JavaScript.
JSObject
__retVal;
763
public static partial global::System.Threading.Tasks.Task<global::System.Runtime.InteropServices.JavaScript.
JSObject
> DynamicImport(string moduleName, string moduleUrl)
775
global::System.Threading.Tasks.Task<global::System.Runtime.InteropServices.JavaScript.
JSObject
> __retVal;
792
__retVal_native.ToManaged(out __retVal, static (ref global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument __task_result_arg, out global::System.Runtime.InteropServices.JavaScript.
JSObject
__task_result) =>
System\Runtime\InteropServices\JavaScript\Interop\JavaScriptImports.Generated.cs (19)
12
public static partial bool HasProperty(
JSObject
self, string propertyName);
14
public static partial string GetTypeOfProperty(
JSObject
self, string propertyName);
16
public static partial bool GetPropertyAsBoolean(
JSObject
self, string propertyName);
18
public static partial int GetPropertyAsInt32(
JSObject
self, string propertyName);
20
public static partial double GetPropertyAsDouble(
JSObject
self, string propertyName);
22
public static partial string GetPropertyAsString(
JSObject
self, string propertyName);
24
public static partial
JSObject
GetPropertyAsJSObject(
JSObject
self, string propertyName);
26
public static partial byte[] GetPropertyAsByteArray(
JSObject
self, string propertyName);
29
public static partial void SetPropertyBool(
JSObject
self, string propertyName, bool value);
31
public static partial void SetPropertyInt(
JSObject
self, string propertyName, int value);
33
public static partial void SetPropertyDouble(
JSObject
self, string propertyName, double value);
35
public static partial void SetPropertyString(
JSObject
self, string propertyName, string value);
37
public static partial void SetPropertyJSObject(
JSObject
self, string propertyName,
JSObject
value);
39
public static partial void SetPropertyBytes(
JSObject
self, string propertyName, byte[] value);
42
public static partial
JSObject
GetGlobalThis();
44
public static partial
JSObject
GetDotnetInstance();
46
public static partial Task<
JSObject
> DynamicImport(string moduleName, string moduleUrl);
System\Runtime\InteropServices\JavaScript\JSException.cs (2)
15
internal
JSObject
? jsException;
28
internal JSException(string msg,
JSObject
? jsException) : base(msg)
System\Runtime\InteropServices\JavaScript\JSFunctionBinding.cs (2)
204
internal static unsafe void InvokeJSFunction(
JSObject
jsFunction, Span<JSMarshalerArgument> arguments)
230
internal static unsafe void InvokeJSFunctionCurrent(
JSObject
jsFunction, Span<JSMarshalerArgument> arguments)
System\Runtime\InteropServices\JavaScript\JSHost.cs (3)
20
public static
JSObject
GlobalThis
31
public static
JSObject
DotnetInstance
50
public static Task<
JSObject
> ImportAsync(string moduleName, string moduleUrl, CancellationToken cancellationToken = default)
System\Runtime\InteropServices\JavaScript\JSHostImplementation.cs (5)
81
public static async Task<
JSObject
> ImportAsync(string moduleName, string moduleUrl, CancellationToken cancellationToken)
83
Task<
JSObject
> modulePromise = JavaScriptImports.DynamicImport(moduleName, moduleUrl);
93
public static async Task<
JSObject
> CancellationHelper(Task<
JSObject
> jsTask, CancellationToken cancellationToken)
101
CancelablePromise.CancelPromise((Task<
JSObject
>)s!);
System\Runtime\InteropServices\JavaScript\JSObject.cs (3)
106
/// Returns value of the property as <see cref="
JSObject
"/> proxy if the property exists, otherwise null.
114
public
JSObject
? GetPropertyAsJSObject(string propertyName)
190
public void SetProperty(string propertyName,
JSObject
? value)
System\Runtime\InteropServices\JavaScript\JSObject.References.cs (1)
37
public override bool Equals([NotNullWhen(true)] object? obj) => obj is
JSObject
other && JSHandle == other.JSHandle;
System\Runtime\InteropServices\JavaScript\JSProxyContext.cs (8)
16
private readonly Dictionary<nint, WeakReference<
JSObject
>> ThreadCsOwnedObjects = new();
455
public
JSObject
CreateCSOwnedProxy(nint jsHandle)
461
JSObject
? res;
462
if (!ThreadCsOwnedObjects.TryGetValue(jsHandle, out WeakReference<
JSObject
>? reference) ||
467
ThreadCsOwnedObjects[jsHandle] = new WeakReference<
JSObject
>(res, trackResurrection: true);
473
public static void ReleaseCSOwnedObject(
JSObject
jso, bool skipJS)
545
List<WeakReference<
JSObject
>> copy = new(ThreadCsOwnedObjects.Values);
548
if (jsObjectWeak.TryGetTarget(out
var
jso))
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Exception.cs (2)
34
JSObject
? jsException = null;
73
var
jsException = jse.jsException;
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Func.cs (24)
10
private
JSObject
JSObject;
12
public ActionJS(
JSObject
holder)
43
private
JSObject
JSObject;
45
public ActionJS(
JSObject
holder, ArgumentToJSCallback<T> arg1Marshaler)
79
private
JSObject
JSObject;
81
public ActionJS(
JSObject
holder, ArgumentToJSCallback<T1> arg1Marshaler, ArgumentToJSCallback<T2> arg2Marshaler)
120
private
JSObject
JSObject;
122
public ActionJS(
JSObject
holder, ArgumentToJSCallback<T1> arg1Marshaler, ArgumentToJSCallback<T2> arg2Marshaler, ArgumentToJSCallback<T3> arg3Marshaler)
174
var
holder = ctx.CreateCSOwnedProxy(slot.JSHandle);
194
var
holder = ctx.CreateCSOwnedProxy(slot.JSHandle);
216
var
holder = ctx.CreateCSOwnedProxy(slot.JSHandle);
240
var
holder = ctx.CreateCSOwnedProxy(slot.JSHandle);
246
private
JSObject
JSObject;
249
public FuncJS(
JSObject
holder, ArgumentToManagedCallback<TResult> resMarshaler)
286
private
JSObject
JSObject;
288
public FuncJS(
JSObject
holder, ArgumentToJSCallback<T> arg1Marshaler, ArgumentToManagedCallback<TResult> resMarshaler)
326
private
JSObject
JSObject;
328
public FuncJS(
JSObject
holder, ArgumentToJSCallback<T1> arg1Marshaler, ArgumentToJSCallback<T2> arg2Marshaler, ArgumentToManagedCallback<TResult> resMarshaler)
371
private
JSObject
JSObject;
373
public FuncJS(
JSObject
holder, ArgumentToJSCallback<T1> arg1Marshaler, ArgumentToJSCallback<T2> arg2Marshaler, ArgumentToJSCallback<T3> arg3Marshaler, ArgumentToManagedCallback<TResult> resMarshaler)
430
var
holder = ctx.CreateCSOwnedProxy(slot.JSHandle);
452
var
holder = ctx.CreateCSOwnedProxy(slot.JSHandle);
477
var
holder = ctx.CreateCSOwnedProxy(slot.JSHandle);
502
var
holder = ctx.CreateCSOwnedProxy(slot.JSHandle);
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.JSObject.cs (7)
18
public void ToManaged(out
JSObject
? value)
37
public void ToJS(
JSObject
? value)
74
public unsafe void ToManaged(out
JSObject
?[]? value)
82
value = new
JSObject
?[slot.Length];
87
JSObject
? val;
102
public unsafe void ToJS(
JSObject
?[] value)
118
JSObject
? val = value[i];
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Object.cs (4)
51
ToManaged(out
JSObject
? val);
266
else if (typeof(
JSObject
).IsAssignableFrom(type))
268
JSObject
? val = value as
JSObject
;
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Task.cs (11)
214
var
taskHolder = ctx.CreateCSOwnedProxy(slot.JSHandle);
226
var
taskHolderArg = (
JSObject
)th!;
300
var
taskHolder = ctx.CreateCSOwnedProxy(slot.JSHandle);
312
JSObject
taskHolderArg = (
JSObject
)th!;
379
var
taskHolder = ctx.CreateCSOwnedProxy(slot.JSHandle);
442
private sealed record HolderAndMarshaler<T>(
JSObject
TaskHolder, ArgumentToJSCallback<T> Marshaler);
444
private static unsafe void RejectPromise(
JSObject
holder, Exception ex)
479
private static unsafe void ResolveVoidPromise(
JSObject
holder)
513
private static unsafe void ResolvePromise<T>(
JSObject
holder, T value, ArgumentToJSCallback<T> marshaler)