1 interface inheriting from IJSObjectReference
Microsoft.JSInterop (1)
IJSInProcessObjectReference.cs (1)
12public interface IJSInProcessObjectReference : IJSObjectReference, IDisposable
1 implementation of IJSObjectReference
Microsoft.JSInterop (1)
Implementation\JSObjectReference.cs (1)
12public class JSObjectReference : IJSObjectReference
72 references to IJSObjectReference
Aspire.Dashboard (15)
Components\Controls\Chart\MetricTable.razor.cs (2)
23private IJSObjectReference? _jsModule; 237_jsModule = await JS.InvokeAsync<IJSObjectReference>("import", "/Components/Controls/Chart/MetricTable.razor.js");
Components\Controls\Chart\PlotlyChart.razor.cs (2)
39private IJSObjectReference? _jsModule; 174_jsModule = await JS.InvokeAsync<IJSObjectReference>("import", "/js/app-metrics.js");
Components\Dialogs\TextVisualizerDialog.razor.cs (2)
27private IJSObjectReference? _jsModule; 64_jsModule = await JS.InvokeAsync<IJSObjectReference>("import", "/Components/Dialogs/TextVisualizerDialog.razor.js");
Components\Layout\MainLayout.razor.cs (4)
22private IJSObjectReference? _jsModule; 23private IJSObjectReference? _keyboardHandlers; 139_jsModule = await JS.InvokeAsync<IJSObjectReference>("import", "/js/app-theme.js"); 142_keyboardHandlers = await JS.InvokeAsync<IJSObjectReference>("window.registerGlobalKeydownListener", _shortcutManagerReference);
Components\Pages\Login.razor.cs (2)
16private IJSObjectReference? _jsModule; 63_jsModule = await JS.InvokeAsync<IJSObjectReference>("import", "/Components/Pages/Login.razor.js");
Model\ThemeManager.cs (2)
21private IJSObjectReference? _jsModule; 27_jsModule = await _jsRuntime.InvokeAsync<IJSObjectReference>("import", "/js/app-theme.js").ConfigureAwait(false);
Utils\JSInteropHelpers.cs (1)
10public static async Task SafeDisposeAsync(IJSObjectReference? jsObjectReference)
BasicTestApp (6)
EventCustomArgsTypes.cs (1)
35public IJSObjectReference JsObject { get; set; }
InteropTest\JavaScriptInterop.cs (5)
415public static IJSObjectReference RoundTripJSObjectReference(IJSObjectReference jsObjectReference) 421public static async Task<IJSObjectReference> RoundTripJSObjectReferenceAsync(IJSObjectReference jSObjectReference) 442public static async Task<string> InvokeDisposedJSObjectReferenceExceptionAsync(IJSObjectReference jsObjectReference)
Microsoft.AspNetCore.Components.Endpoints (2)
src\Components\Shared\src\ResourceCollectionProvider.cs (2)
66var module = await _jsRuntime.InvokeAsync<IJSObjectReference>("import", _url);
Microsoft.AspNetCore.Components.QuickGrid (4)
QuickGrid.razor.cs (4)
132private IJSObjectReference? _jsModule; 133private IJSObjectReference? _jsEventDisposable; 203_jsModule = await JS.InvokeAsync<IJSObjectReference>("import", "./_content/Microsoft.AspNetCore.Components.QuickGrid/QuickGrid.razor.js"); 204_jsEventDisposable = await _jsModule.InvokeAsync<IJSObjectReference>("init", _tableReference);
Microsoft.AspNetCore.Components.Web (4)
JSComponents\JSComponentInterop.cs (4)
109JsonSerializer.Deserialize<IJSObjectReference>(parameterJsonValue, jsonOptions)), 112JsonSerializer.Deserialize<IJSObjectReference>(parameterJsonValue, jsonOptions)), 174private static EventCallback CreateEventCallbackWithNoParameters(IJSObjectReference? jsObjectReference) 182private static object CreateEventCallbackWithSingleParameter(Type eventCallbackType, IJSObjectReference? jsObjectReference)
Microsoft.AspNetCore.Components.WebAssembly (2)
src\Components\Shared\src\ResourceCollectionProvider.cs (2)
66var module = await _jsRuntime.InvokeAsync<IJSObjectReference>("import", _url);
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
JSObjectReferenceJsonConverterTest.cs (1)
28var deserialized = (JSObjectReference)JsonSerializer.Deserialize<IJSObjectReference>(json, JsonSerializerOptions)!;
Microsoft.AspNetCore.Components.WebView.Maui (2)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (2)
136 await using var module = await JSRuntime.InvokeAsync<IJSObjectReference>("import", "./_framework/static-content-hot-reload.js");
Microsoft.AspNetCore.Components.WebView.WindowsForms (2)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (2)
136 await using var module = await JSRuntime.InvokeAsync<IJSObjectReference>("import", "./_framework/static-content-hot-reload.js");
Microsoft.AspNetCore.Components.WebView.Wpf (2)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (2)
136 await using var module = await JSRuntime.InvokeAsync<IJSObjectReference>("import", "./_framework/static-content-hot-reload.js");
Microsoft.JSInterop (21)
Implementation\JSObjectReference.cs (1)
10/// Implements functionality for <see cref="IJSObjectReference"/>.
Implementation\JSObjectReferenceJsonWorker.cs (1)
9/// Used by JsonConverters to read or write a <see cref="IJSObjectReference"/> instance.
Infrastructure\JSObjectReferenceJsonConverter.cs (4)
10internal sealed class JSObjectReferenceJsonConverter : JsonConverter<IJSObjectReference> 20=> typeToConvert == typeof(IJSObjectReference) || typeToConvert == typeof(JSObjectReference); 22public override IJSObjectReference? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 28public override void Write(Utf8JsonWriter writer, IJSObjectReference value, JsonSerializerOptions options)
JSObjectReferenceExtensions.cs (14)
11/// Extensions for <see cref="IJSObjectReference"/>. 18/// <param name="jsObjectReference">The <see cref="IJSObjectReference"/>.</param> 22public static async ValueTask InvokeVoidAsync(this IJSObjectReference jsObjectReference, string identifier, params object?[]? args) 33/// consider using <see cref="IJSObjectReference.InvokeAsync{TValue}(string, CancellationToken, object[])" />. 36/// <param name="jsObjectReference">The <see cref="IJSObjectReference"/>.</param> 41public static ValueTask<TValue> InvokeAsync<[DynamicallyAccessedMembers(JsonSerialized)] TValue>(this IJSObjectReference jsObjectReference, string identifier, params object?[]? args) 52/// <param name="jsObjectReference">The <see cref="IJSObjectReference"/>.</param> 60public static ValueTask<TValue> InvokeAsync<[DynamicallyAccessedMembers(JsonSerialized)] TValue>(this IJSObjectReference jsObjectReference, string identifier, CancellationToken cancellationToken, params object?[]? args) 70/// <param name="jsObjectReference">The <see cref="IJSObjectReference"/>.</param> 78public static async ValueTask InvokeVoidAsync(this IJSObjectReference jsObjectReference, string identifier, CancellationToken cancellationToken, params object?[]? args) 88/// <param name="jsObjectReference">The <see cref="IJSObjectReference"/>.</param> 93public static async ValueTask<TValue> InvokeAsync<[DynamicallyAccessedMembers(JsonSerialized)] TValue>(this IJSObjectReference jsObjectReference, string identifier, TimeSpan timeout, params object?[]? args) 106/// <param name="jsObjectReference">The <see cref="IJSObjectReference"/>.</param> 111public static async ValueTask InvokeVoidAsync(this IJSObjectReference jsObjectReference, string identifier, TimeSpan timeout, params object?[]? args)
src\Shared\JSInterop\JSCallResultTypeHelper.cs (1)
18if (typeof(TResult) == typeof(IJSObjectReference) ||
Microsoft.JSInterop.Tests (6)
Infrastructure\JSObjectReferenceJsonConverterTest.cs (6)
27var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<IJSObjectReference>(json, JsonSerializerOptions)); 38var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<IJSObjectReference>(json, JsonSerializerOptions)); 49var ex = Record.Exception(() => JsonSerializer.Deserialize<IJSObjectReference>(json, JsonSerializerOptions)); 60var ex = Record.Exception(() => JsonSerializer.Deserialize<IJSObjectReference>(json, JsonSerializerOptions)); 72var deserialized = (JSObjectReference)JsonSerializer.Deserialize<IJSObjectReference>(json, JsonSerializerOptions)!; 85var json = JsonSerializer.Serialize((IJSObjectReference)jsObjectRef, JsonSerializerOptions);
Microsoft.JSInterop.WebAssembly (5)
src\Shared\JSInterop\JSCallResultTypeHelper.cs (1)
18if (typeof(TResult) == typeof(IJSObjectReference) ||
WebAssemblyJSObjectReferenceJsonConverter.cs (4)
10internal sealed class WebAssemblyJSObjectReferenceJsonConverter : JsonConverter<IJSObjectReference> 22typeToConvert == typeof(IJSObjectReference) || 26public override IJSObjectReference? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 32public override void Write(Utf8JsonWriter writer, IJSObjectReference value, JsonSerializerOptions options)