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)
8public static partial int WebSocketGetState(global::System.Runtime.InteropServices.JavaScript.JSObject webSocket) 56public static partial global::System.Runtime.InteropServices.JavaScript.JSObject WebSocketCreate(string uri, string[] subProtocols, nint responseStatusPtr) 69global::System.Runtime.InteropServices.JavaScript.JSObject __retVal; 110public static partial global::System.Threading.Tasks.Task WebSocketOpen(global::System.Runtime.InteropServices.JavaScript.JSObject webSocket) 158public static partial global::System.Threading.Tasks.Task WebSocketSend(global::System.Runtime.InteropServices.JavaScript.JSObject webSocket, nint bufferPtr, int bufferLength, int messageType, bool endOfMessage) 218public static partial global::System.Threading.Tasks.Task WebSocketReceive(global::System.Runtime.InteropServices.JavaScript.JSObject webSocket, nint bufferPtr, int bufferLength) 272public static partial global::System.Threading.Tasks.Task WebSocketClose(global::System.Runtime.InteropServices.JavaScript.JSObject webSocket, int code, string reason, bool waitForCloseReceived) 329public 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)
8public static partial bool HasProperty(global::System.Runtime.InteropServices.JavaScript.JSObject self, string propertyName) 59public static partial string GetTypeOfProperty(global::System.Runtime.InteropServices.JavaScript.JSObject self, string propertyName) 110public static partial bool GetPropertyAsBoolean(global::System.Runtime.InteropServices.JavaScript.JSObject self, string propertyName) 161public static partial int GetPropertyAsInt32(global::System.Runtime.InteropServices.JavaScript.JSObject self, string propertyName) 212public static partial double GetPropertyAsDouble(global::System.Runtime.InteropServices.JavaScript.JSObject self, string propertyName) 263public static partial string GetPropertyAsString(global::System.Runtime.InteropServices.JavaScript.JSObject self, string propertyName) 314public static partial global::System.Runtime.InteropServices.JavaScript.JSObject GetPropertyAsJSObject(global::System.Runtime.InteropServices.JavaScript.JSObject self, string propertyName) 326global::System.Runtime.InteropServices.JavaScript.JSObject __retVal; 365public static partial byte[] GetPropertyAsByteArray(global::System.Runtime.InteropServices.JavaScript.JSObject self, string propertyName) 416public static partial void SetPropertyBool(global::System.Runtime.InteropServices.JavaScript.JSObject self, string propertyName, bool value) 462public static partial void SetPropertyInt(global::System.Runtime.InteropServices.JavaScript.JSObject self, string propertyName, int value) 508public static partial void SetPropertyDouble(global::System.Runtime.InteropServices.JavaScript.JSObject self, string propertyName, double value) 554public static partial void SetPropertyString(global::System.Runtime.InteropServices.JavaScript.JSObject self, string propertyName, string value) 600public static partial void SetPropertyJSObject(global::System.Runtime.InteropServices.JavaScript.JSObject self, string propertyName, global::System.Runtime.InteropServices.JavaScript.JSObject value) 646public static partial void SetPropertyBytes(global::System.Runtime.InteropServices.JavaScript.JSObject self, string propertyName, byte[] value) 692public static partial global::System.Runtime.InteropServices.JavaScript.JSObject GetGlobalThis() 702global::System.Runtime.InteropServices.JavaScript.JSObject __retVal; 736public static partial global::System.Runtime.InteropServices.JavaScript.JSObject GetDotnetInstance() 746global::System.Runtime.InteropServices.JavaScript.JSObject __retVal; 780public static partial global::System.Threading.Tasks.Task<global::System.Runtime.InteropServices.JavaScript.JSObject> DynamicImport(string moduleName, string moduleUrl) 792global::System.Threading.Tasks.Task<global::System.Runtime.InteropServices.JavaScript.JSObject> __retVal; 809__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)