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