1 interface inheriting from IJSObjectReference
Microsoft.JSInterop (1)
IJSInProcessObjectReference.cs (1)
12
public interface IJSInProcessObjectReference :
IJSObjectReference
, IDisposable
2 implementations of IJSObjectReference
Aspire.Dashboard.Components.Tests (1)
Shared\TestJSObjectReference.cs (1)
10
internal sealed class TestJSObjectReference :
IJSObjectReference
Microsoft.JSInterop (1)
Implementation\JSObjectReference.cs (1)
13
public class JSObjectReference :
IJSObjectReference
126 references to IJSObjectReference
Aspire.Dashboard (39)
Components\Controls\Chart\MetricTable.razor.cs (2)
25
private
IJSObjectReference
? _jsModule;
242
_jsModule = await JS.InvokeAsync<
IJSObjectReference
>("import", $"/{Assets["Components/Controls/Chart/MetricTable.razor.js"]}");
Components\Controls\Chart\PlotlyChart.razor.cs (2)
42
private
IJSObjectReference
? _jsModule;
190
_jsModule = await JS.InvokeAsync<
IJSObjectReference
>("import", $"/{Assets["js/app-metrics.js"]}");
Components\Controls\IconCheckbox.razor.cs (2)
32
private
IJSObjectReference
? _jsModule;
104
_jsModule = await JS.InvokeAsync<
IJSObjectReference
>("import", $"./{Assets[JsModulePath]}");
Components\Controls\MarkdownRenderer.razor.cs (2)
12
private
IJSObjectReference
? _jsModule;
47
_jsModule = await JS.InvokeAsync<
IJSObjectReference
>("import", $"/{Assets["Components/Controls/MarkdownRenderer.razor.js"]}");
Components\Controls\TerminalTitle.razor.cs (2)
21
private
IJSObjectReference
? _jsModule;
63
_jsModule = await JS.InvokeAsync<
IJSObjectReference
>("import", $"./{Assets["Components/Controls/TerminalTitle.razor.js"]}");
Components\Controls\TerminalView.razor.cs (2)
22
private
IJSObjectReference
? _jsModule;
215
_jsModule ??= await JS.InvokeAsync<
IJSObjectReference
>("import", moduleUri.PathAndQuery);
Components\Controls\TextVisualizer.razor.cs (2)
18
private
IJSObjectReference
? _jsModule;
58
_jsModule = await JS.InvokeAsync<
IJSObjectReference
>("import", $"/{Assets["Components/Controls/TextVisualizer.razor.js"]}");
Components\Dialogs\FilterDialog.razor.cs (2)
47
private
IJSObjectReference
? _jsModule;
412
_jsModule ??= await JS.InvokeAsync<
IJSObjectReference
>("import", $"./{Assets["Components/Dialogs/FilterDialog.razor.js"]}");
Components\Dialogs\InteractionsInputDialog.razor.cs (2)
44
private
IJSObjectReference
? _jsModule;
89
_jsModule = await JS.InvokeAsync<
IJSObjectReference
>("import", $"./{Assets["Components/Dialogs/InteractionsInputDialog.razor.js"]}");
Components\Layout\MainLayout.razor.cs (4)
36
private
IJSObjectReference
? _jsModule;
37
private
IJSObjectReference
? _keyboardHandlers;
257
_jsModule = await JS.InvokeAsync<
IJSObjectReference
>("import", $"/{Assets["js/app-theme.js"]}");
262
_keyboardHandlers = await JS.InvokeAsync<
IJSObjectReference
>("window.registerGlobalKeydownListener", _shortcutManagerReference);
Components\Layout\MobileNavMenu.razor.cs (4)
18
private
IJSObjectReference
? _keyboardNavigation;
73
var
keyboardNavigation = await JS.InvokeAsync<
IJSObjectReference
>("initializeMobileNavMenuKeyboardNavigation", _mobileNavMenuReference, MobileNavMenuId);
124
private async ValueTask DisposeKeyboardNavigationAsync(
IJSObjectReference
keyboardNavigation)
Components\Layout\TerminalDock.razor.cs (2)
57
private
IJSObjectReference
? _jsModule;
176
_jsModule = await JS.InvokeAsync<
IJSObjectReference
>(
Components\Pages\Login.razor.cs (2)
17
private
IJSObjectReference
? _jsModule;
72
_jsModule = await JS.InvokeAsync<
IJSObjectReference
>("import", $"/{Assets["Components/Pages/Login.razor.js"]}");
Components\Pages\Resources.razor.cs (2)
123
private
IJSObjectReference
? _jsModule;
381
_jsModule = await JS.InvokeAsync<
IJSObjectReference
>("import", $"/{Assets["js/app-resourcegraph.js"]}");
Components\Pages\TerminalWindow.razor.cs (2)
39
private
IJSObjectReference
? _windowModule;
167
_windowModule ??= await JS.InvokeAsync<
IJSObjectReference
>("import", moduleUri.PathAndQuery);
Model\TerminalWindowLauncher.cs (2)
71
private
IJSObjectReference
? _module;
118
_module = await _js.InvokeAsync<
IJSObjectReference
>("import", moduleUri.PathAndQuery).ConfigureAwait(false);
Model\ThemeManager.cs (2)
21
private
IJSObjectReference
? _jsModule;
27
_jsModule = await _jsRuntime.InvokeAsync<
IJSObjectReference
>("import", "/js/app-theme.js").ConfigureAwait(false);
Utils\JSInteropHelpers.cs (1)
10
public static async Task SafeDisposeAsync(
IJSObjectReference
? jsObjectReference)
Aspire.Dashboard.Components.Tests (2)
Shared\TestJSObjectReference.cs (2)
18
public static JSRuntimeInvocationHandler<
IJSObjectReference
> SetupImport(BunitContext context, string modulePath)
48
private sealed class ImportHandler(string modulePath) : JSRuntimeInvocationHandler<
IJSObjectReference
>(
Microsoft.AspNetCore.Components.Endpoints (4)
DependencyInjection\UnsupportedJavaScriptRuntime.cs (2)
20
public ValueTask<
IJSObjectReference
> InvokeConstructorAsync(string identifier, object?[]? args)
23
public ValueTask<
IJSObjectReference
> InvokeConstructorAsync(string identifier, CancellationToken cancellationToken, object?[]? args)
src\aspnetcore\src\Components\Shared\src\ResourceCollectionProvider.cs (2)
57
var
module = await _jsRuntime.InvokeAsync<
IJSObjectReference
>("import", _url);
Microsoft.AspNetCore.Components.QuickGrid (4)
QuickGrid.razor.cs (4)
201
private
IJSObjectReference
? _jsModule;
202
private
IJSObjectReference
? _jsEventDisposable;
314
_jsModule = await JS.InvokeAsync<
IJSObjectReference
>("import", "./_content/Microsoft.AspNetCore.Components.QuickGrid/QuickGrid.razor.js");
321
_jsEventDisposable = await _jsModule.InvokeAsync<
IJSObjectReference
>("init", _tableReference);
Microsoft.AspNetCore.Components.Web (4)
JSComponents\JSComponentInterop.cs (4)
114
JsonSerializer.Deserialize<
IJSObjectReference
>(parameterJsonValue, jsonOptions)),
117
JsonSerializer.Deserialize<
IJSObjectReference
>(parameterJsonValue, jsonOptions)),
183
private static EventCallback CreateEventCallbackWithNoParameters(
IJSObjectReference
? jsObjectReference)
191
private static object CreateEventCallbackWithSingleParameter(Type eventCallbackType,
IJSObjectReference
? jsObjectReference)
Microsoft.AspNetCore.Components.WebAssembly (2)
src\aspnetcore\src\Components\Shared\src\ResourceCollectionProvider.cs (2)
57
var
module = await _jsRuntime.InvokeAsync<
IJSObjectReference
>("import", _url);
Microsoft.AspNetCore.Components.WebView.Maui (2)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (2)
154
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)
154
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)
154
await using
var
module = await JSRuntime.InvokeAsync<
IJSObjectReference
>("import", "./_framework/static-content-hot-reload.js");
Microsoft.JSInterop (60)
IJSInProcessRuntime.cs (1)
29
/// <returns>An <see cref="
IJSObjectReference
"/> instance that represents the created JS object.</returns>
IJSObjectReference.cs (4)
45
/// <returns>An <see cref="
IJSObjectReference
"/> instance that represents the created JS object.</returns>
46
ValueTask<
IJSObjectReference
> InvokeConstructorAsync(string identifier, object?[]? args)
58
/// <returns>An <see cref="
IJSObjectReference
"/> instance that represents the created JS object.</returns>
59
ValueTask<
IJSObjectReference
> InvokeConstructorAsync(string identifier, CancellationToken cancellationToken, object?[]? args)
IJSRuntime.cs (4)
45
/// <returns>An <see cref="
IJSObjectReference
"/> instance that represents the created JS object.</returns>
46
ValueTask<
IJSObjectReference
> InvokeConstructorAsync(string identifier, object?[]? args)
58
/// <returns>An <see cref="
IJSObjectReference
"/> instance that represents the created JS object.</returns>
59
ValueTask<
IJSObjectReference
> InvokeConstructorAsync(string identifier, CancellationToken cancellationToken, object?[]? args)
Implementation\JSObjectReference.cs (5)
11
/// Implements functionality for <see cref="
IJSObjectReference
"/>.
53
public ValueTask<
IJSObjectReference
> InvokeConstructorAsync(string identifier, object?[]? args)
57
return _jsRuntime.InvokeAsync<
IJSObjectReference
>(Id, identifier, JSCallType.ConstructorCall, args);
61
public ValueTask<
IJSObjectReference
> InvokeConstructorAsync(string identifier, CancellationToken cancellationToken, object?[]? args)
65
return _jsRuntime.InvokeAsync<
IJSObjectReference
>(Id, identifier, JSCallType.ConstructorCall, cancellationToken, args);
Implementation\JSObjectReferenceJsonWorker.cs (1)
9
/// Used by JsonConverters to read or write a <see cref="
IJSObjectReference
"/> instance.
Infrastructure\JSObjectReferenceJsonConverter.cs (4)
10
internal sealed class JSObjectReferenceJsonConverter : JsonConverter<
IJSObjectReference
>
20
=> typeToConvert == typeof(
IJSObjectReference
) || typeToConvert == typeof(JSObjectReference);
22
public override
IJSObjectReference
? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
34
public override void Write(Utf8JsonWriter writer,
IJSObjectReference
value, JsonSerializerOptions options)
JSObjectReferenceExtensions.cs (30)
11
/// Extensions for <see cref="
IJSObjectReference
"/>.
18
/// <param name="jsObjectReference">The <see cref="
IJSObjectReference
"/>.</param>
22
public 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>
41
public static ValueTask<TValue> InvokeAsync<[DynamicallyAccessedMembers(JsonSerialized)] TValue>(this
IJSObjectReference
jsObjectReference, string identifier, params object?[]? args)
52
/// <param name="jsObjectReference">The <see cref="
IJSObjectReference
"/>.</param>
60
public 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>
78
public static async ValueTask InvokeVoidAsync(this
IJSObjectReference
jsObjectReference, string identifier, CancellationToken cancellationToken, params object?[]? args)
88
/// <param name="jsObjectReference">The <see cref="
IJSObjectReference
"/>.</param>
93
public 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>
111
public static async ValueTask InvokeVoidAsync(this
IJSObjectReference
jsObjectReference, string identifier, TimeSpan timeout, params object?[]? args)
124
/// <param name="jsObjectReference">The <see cref="
IJSObjectReference
"/>.</param>
127
/// <returns>An <see cref="
IJSObjectReference
"/> instance that represents the created JS object.</returns>
128
public static ValueTask<
IJSObjectReference
> InvokeConstructorAsync(this
IJSObjectReference
jsObjectReference, string identifier, params object?[]? args)
138
/// <param name="jsObjectReference">The <see cref="
IJSObjectReference
"/>.</param>
145
/// <returns>An <see cref="
IJSObjectReference
"/> instance that represents the created JS object.</returns>
146
public static ValueTask<
IJSObjectReference
> InvokeConstructorAsync(this
IJSObjectReference
jsObjectReference, string identifier, CancellationToken cancellationToken, object?[]? args)
156
/// <param name="jsObjectReference">The <see cref="
IJSObjectReference
"/>.</param>
160
/// <returns>An <see cref="
IJSObjectReference
"/> instance that represents the created JS object.</returns>
161
public static ValueTask<
IJSObjectReference
> InvokeConstructorAsync(this
IJSObjectReference
jsObjectReference, string identifier, TimeSpan timeout, object?[]? args)
175
/// <param name="jsObjectReference">The <see cref="
IJSObjectReference
"/>.</param>
179
public static ValueTask<TValue> GetValueAsync<[DynamicallyAccessedMembers(JsonSerialized)] TValue>(this
IJSObjectReference
jsObjectReference, string identifier, TimeSpan timeout)
193
/// <param name="jsObjectReference">The <see cref="
IJSObjectReference
"/>.</param>
198
public static ValueTask SetValueAsync<[DynamicallyAccessedMembers(JsonSerialized)] TValue>(this
IJSObjectReference
jsObjectReference, string identifier, TValue value, TimeSpan timeout)
JSRuntime.cs (4)
99
public ValueTask<
IJSObjectReference
> InvokeConstructorAsync(string identifier, object?[]? args)
100
=> InvokeAsync<
IJSObjectReference
>(WindowObjectId, identifier, JSCallType.ConstructorCall, args);
103
public ValueTask<
IJSObjectReference
> InvokeConstructorAsync(string identifier, CancellationToken cancellationToken, object?[]? args)
104
=> InvokeAsync<
IJSObjectReference
>(WindowObjectId, identifier, JSCallType.ConstructorCall, cancellationToken, args);
JSRuntimeExtensions.cs (6)
127
/// <returns>An <see cref="
IJSObjectReference
"/> instance that represents the created JS object.</returns>
128
public static ValueTask<
IJSObjectReference
> InvokeConstructorAsync(this IJSRuntime jsRuntime, string identifier, params object?[]? args)
145
/// <returns>An <see cref="
IJSObjectReference
"/> instance that represents the created JS object.</returns>
146
public static ValueTask<
IJSObjectReference
> InvokeConstructorAsync(this IJSRuntime jsRuntime, string identifier, CancellationToken cancellationToken, object?[]? args)
160
/// <returns>An <see cref="
IJSObjectReference
"/> instance that represents the created JS object.</returns>
161
public static ValueTask<
IJSObjectReference
> InvokeConstructorAsync(this IJSRuntime jsRuntime, string identifier, TimeSpan timeout, object?[]? args)
src\aspnetcore\src\Shared\JSInterop\JSCallResultTypeHelper.cs (1)
18
if (typeof(TResult) == typeof(
IJSObjectReference
) ||
Microsoft.JSInterop.WebAssembly (5)
src\aspnetcore\src\Shared\JSInterop\JSCallResultTypeHelper.cs (1)
18
if (typeof(TResult) == typeof(
IJSObjectReference
) ||
WebAssemblyJSObjectReferenceJsonConverter.cs (4)
10
internal sealed class WebAssemblyJSObjectReferenceJsonConverter : JsonConverter<
IJSObjectReference
>
22
typeToConvert == typeof(
IJSObjectReference
) ||
26
public override
IJSObjectReference
? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
38
public override void Write(Utf8JsonWriter writer,
IJSObjectReference
value, JsonSerializerOptions options)