1 interface inheriting from IJSRuntime
Microsoft.JSInterop (1)
IJSInProcessRuntime.cs (1)
12public interface IJSInProcessRuntime : IJSRuntime
6 implementations of IJSRuntime
Microsoft.AspNetCore.Components.Endpoints (1)
DependencyInjection\UnsupportedJavaScriptRuntime.cs (1)
8internal sealed class UnsupportedJavaScriptRuntime : IJSRuntime
Microsoft.AspNetCore.Components.Server.Tests (3)
Circuits\RemoteJSDataStreamTest.cs (1)
300class TestRemoteJSRuntime : RemoteJSRuntime, IJSRuntime
Circuits\RemoteJSRuntimeTest.cs (1)
108class TestRemoteJSRuntime : RemoteJSRuntime, IJSRuntime
ProtectedBrowserStorageTest.cs (1)
353class TestJSRuntime : IJSRuntime
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
PullFromJSDataStreamTest.cs (1)
112class TestJSRuntime : IJSRuntime
Microsoft.JSInterop (1)
JSRuntime.cs (1)
16public abstract partial class JSRuntime : IJSRuntime, IDisposable
105 references to IJSRuntime
BasicTestApp (2)
PrependMessageLoggerProvider.cs (1)
17public PrependMessageLoggerProvider(string message, IJSRuntime runtime)
Program.cs (1)
51new PrependMessageLoggerProvider(builder.Configuration["Logging:PrependMessage:Message"], s.GetService<IJSRuntime>()));
Microsoft.AspNetCore.App.Analyzers.Test (1)
Verifiers\CSharpAnalyzerVerifier.cs (1)
101TrimAssemblyExtension(typeof(Microsoft.JSInterop.IJSRuntime).Assembly.Location)));
Microsoft.AspNetCore.Components.Endpoints (4)
DependencyInjection\RazorComponentsServiceCollectionExtensions.cs (1)
61services.TryAddScoped<IJSRuntime, UnsupportedJavaScriptRuntime>();
DependencyInjection\UnsupportedJavaScriptRuntime.cs (1)
15ValueTask<TValue> IJSRuntime.InvokeAsync<TValue>(string identifier, object?[]? args)
src\Components\Shared\src\ResourceCollectionProvider.cs (2)
18private readonly IJSRuntime _jsRuntime; 21public ResourceCollectionProvider(PersistentComponentState state, IJSRuntime jsRuntime)
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
EndpointHtmlRendererTest.cs (2)
1670services.AddSingleton<IJSRuntime, UnsupportedJavaScriptRuntime>(); 1707[Inject] IJSRuntime JsRuntime { get; set; }
Microsoft.AspNetCore.Components.QuickGrid (1)
QuickGrid.razor.cs (1)
108[Inject] private IJSRuntime JS { get; set; } = default!;
Microsoft.AspNetCore.Components.Server (19)
Circuits\CircuitFactory.cs (1)
46var jsRuntime = (RemoteJSRuntime)scope.ServiceProvider.GetRequiredService<IJSRuntime>();
Circuits\RemoteErrorBoundaryLogger.cs (2)
14private readonly IJSRuntime _jsRuntime; 17public RemoteErrorBoundaryLogger(ILogger<ErrorBoundary> logger, IJSRuntime jsRuntime, IOptions<CircuitOptions> options)
Circuits\RemoteNavigationInterception.cs (2)
12private IJSRuntime _jsRuntime; 14public void AttachJSRuntime(IJSRuntime jsRuntime)
Circuits\RemoteNavigationManager.cs (4)
18private IJSRuntime _jsRuntime; 33/// Gets or sets whether the circuit has an attached <see cref="IJSRuntime"/>. 51/// <param name="jsRuntime">The <see cref="IJSRuntime"/> to use for interoperability.</param> 52public void AttachJsRuntime(IJSRuntime jsRuntime)
Circuits\RemoteScrollToLocationHash.cs (2)
12private IJSRuntime _jsRuntime; 14public void AttachJSRuntime(IJSRuntime jsRuntime)
DependencyInjection\ComponentServiceCollectionExtensions.cs (1)
82services.AddScoped<IJSRuntime, RemoteJSRuntime>();
ProtectedBrowserStorage\ProtectedBrowserStorage.cs (3)
17private readonly IJSRuntime _jsRuntime; 26/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param> 28private protected ProtectedBrowserStorage(string storeName, IJSRuntime jsRuntime, IDataProtectionProvider dataProtectionProvider)
ProtectedBrowserStorage\ProtectedLocalStorage.cs (2)
23/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param> 25public ProtectedLocalStorage(IJSRuntime jsRuntime, IDataProtectionProvider dataProtectionProvider)
ProtectedBrowserStorage\ProtectedSessionStorage.cs (2)
23/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param> 25public ProtectedSessionStorage(IJSRuntime jsRuntime, IDataProtectionProvider dataProtectionProvider)
Microsoft.AspNetCore.Components.Server.Tests (6)
Circuits\CircuitHostTest.cs (3)
645serviceCollection.AddSingleton(new Mock<IJSRuntime>().Object); 816private readonly IJSRuntime _js; 818public PerformJSInteropOnDisposeComponent(IJSRuntime jsRuntime)
Circuits\RemoteRendererTest.cs (1)
638serviceCollection.AddSingleton(new Mock<IJSRuntime>().Object);
Circuits\TestCircuitHost.cs (1)
35.Setup(services => services.GetService(typeof(IJSRuntime)))
ProtectedBrowserStorageTest.cs (1)
372public TestProtectedBrowserStorage(string storeName, IJSRuntime jsRuntime, IDataProtectionProvider dataProtectionProvider)
Microsoft.AspNetCore.Components.Web (17)
ElementReferenceExtensions.cs (2)
34var jsRuntime = elementReference.GetJSRuntime(); 44internal static IJSRuntime GetJSRuntime(this ElementReference elementReference)
Forms\InputFile.cs (1)
20internal IJSRuntime JSRuntime { get; set; } = default!; // Internal for testing
Forms\InputFile\BrowserFileStream.cs (2)
11private readonly IJSRuntime _jsRuntime; 23IJSRuntime jsRuntime,
Head\HeadOutlet.cs (1)
23private IJSRuntime JSRuntime { get; set; } = default!;
Routing\FocusOnNavigate.cs (1)
18[Inject] private IJSRuntime JSRuntime { get; set; } = default!;
Routing\NavigationLock.cs (1)
24private IJSRuntime JSRuntime { get; set; } = default!;
Virtualization\Virtualize.cs (1)
55private IJSRuntime JSRuntime { get; set; } = default!;
Virtualization\VirtualizeJsInterop.cs (2)
15private readonly IJSRuntime _jsRuntime; 21public VirtualizeJsInterop(IVirtualizeJsCallbacks owner, IJSRuntime jsRuntime)
WebElementReferenceContext.cs (3)
13internal IJSRuntime JSRuntime { get; } 18/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param> 19public WebElementReferenceContext(IJSRuntime jsRuntime)
WebRenderer.cs (3)
45var jsRuntime = serviceProvider.GetRequiredService<IJSRuntime>(); 104private void AttachWebRendererInterop(IJSRuntime jsRuntime, JsonSerializerOptions jsonOptions, JSComponentInterop jsComponentInterop)
Microsoft.AspNetCore.Components.Web.Tests (6)
Forms\BrowserFileTest.cs (2)
36var jsRuntime = new Mock<IJSRuntime>(MockBehavior.Strict); 60var jsRuntime = new Mock<IJSRuntime>(MockBehavior.Strict);
Virtualization\VirtualizeTest.cs (4)
24.AddTransient((sp) => Mock.Of<IJSRuntime>()) 43.AddTransient((sp) => Mock.Of<IJSRuntime>()) 62.AddTransient((sp) => Mock.Of<IJSRuntime>()) 83.AddTransient((sp) => Mock.Of<IJSRuntime>())
Microsoft.AspNetCore.Components.WebAssembly (10)
Hosting\WebAssemblyHostBuilder.cs (1)
299Services.AddSingleton<IJSRuntime>(DefaultWebAssemblyJSRuntime.Instance);
Services\LazyAssemblyLoader.cs (2)
24/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param> 25public LazyAssemblyLoader(IJSRuntime jsRuntime)
Services\WebAssemblyConsoleLogger.cs (1)
23public WebAssemblyConsoleLogger(IJSRuntime jsRuntime)
src\Components\Shared\src\PullFromJSDataStream.cs (3)
14private readonly IJSRuntime _runtime; 21IJSRuntime runtime, 31IJSRuntime runtime,
src\Components\Shared\src\ResourceCollectionProvider.cs (2)
18private readonly IJSRuntime _jsRuntime; 21public ResourceCollectionProvider(PersistentComponentState state, IJSRuntime jsRuntime)
src\Components\Shared\src\TransmitDataStreamToJS.cs (1)
15internal static async Task TransmitStreamAsync(IJSRuntime runtime, string methodIdentifier, long streamId, DotNetStreamReference dotNetStreamReference)
Microsoft.AspNetCore.Components.WebAssembly.Tests (5)
Hosting\WebAssemblyHostBuilderTest.cs (1)
212typeof(IJSRuntime),
Hosting\WebAssemblyHostTest.cs (3)
22builder.Services.AddSingleton(Mock.Of<IJSRuntime>()); 42builder.Services.AddSingleton(Mock.Of<IJSRuntime>()); 64builder.Services.AddSingleton(Mock.Of<IJSRuntime>());
PullFromJSDataStreamTest.cs (1)
104private static PullFromJSDataStream CreateJSDataStream(byte[] data, IJSRuntime runtime = null)
Microsoft.AspNetCore.Components.WebView (8)
ComponentsWebViewServiceCollectionExtensions.cs (1)
26services.TryAddScoped<IJSRuntime, WebViewJSRuntime>();
PageContext.cs (1)
44JSRuntime = (WebViewJSRuntime)ServiceProvider.GetRequiredService<IJSRuntime>();
Services\WebViewScrollToLocationHash.cs (2)
11private IJSRuntime _jsRuntime; 13public void AttachJSRuntime(IJSRuntime jsRuntime)
src\Components\Shared\src\PullFromJSDataStream.cs (3)
14private readonly IJSRuntime _runtime; 21IJSRuntime runtime, 31IJSRuntime runtime,
src\Components\Shared\src\TransmitDataStreamToJS.cs (1)
15internal static async Task TransmitStreamAsync(IJSRuntime runtime, string methodIdentifier, long streamId, DotNetStreamReference dotNetStreamReference)
Microsoft.JSInterop (14)
JSRuntimeExtensions.cs (14)
11/// Extensions for <see cref="IJSRuntime"/>. 18/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param> 22public static async ValueTask InvokeVoidAsync(this IJSRuntime jsRuntime, string identifier, params object?[]? args) 33/// consider using <see cref="IJSRuntime.InvokeAsync{TValue}(string, CancellationToken, object[])" />. 36/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param> 41public static ValueTask<TValue> InvokeAsync<[DynamicallyAccessedMembers(JsonSerialized)] TValue>(this IJSRuntime jsRuntime, string identifier, params object?[]? args) 52/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param> 60public static ValueTask<TValue> InvokeAsync<[DynamicallyAccessedMembers(JsonSerialized)] TValue>(this IJSRuntime jsRuntime, string identifier, CancellationToken cancellationToken, params object?[]? args) 70/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param> 78public static async ValueTask InvokeVoidAsync(this IJSRuntime jsRuntime, string identifier, CancellationToken cancellationToken, params object?[]? args) 88/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param> 93public static async ValueTask<TValue> InvokeAsync<[DynamicallyAccessedMembers(JsonSerialized)] TValue>(this IJSRuntime jsRuntime, string identifier, TimeSpan timeout, params object?[]? args) 106/// <param name="jsRuntime">The <see cref="IJSRuntime"/>.</param> 111public static async ValueTask InvokeVoidAsync(this IJSRuntime jsRuntime, string identifier, TimeSpan timeout, params object?[]? args)
Microsoft.JSInterop.Tests (8)
JSRuntimeExtensionsTest.cs (8)
17var jsRuntime = new Mock<IJSRuntime>(MockBehavior.Strict); 41var jsRuntime = new Mock<IJSRuntime>(MockBehavior.Strict); 64var jsRuntime = new Mock<IJSRuntime>(MockBehavior.Strict); 79var jsRuntime = new Mock<IJSRuntime>(MockBehavior.Strict); 95var jsRuntime = new Mock<IJSRuntime>(MockBehavior.Strict); 119var jsRuntime = new Mock<IJSRuntime>(MockBehavior.Strict); 141var jsRuntime = new Mock<IJSRuntime>(MockBehavior.Strict); 163var jsRuntime = new Mock<IJSRuntime>(MockBehavior.Strict);
TestContentPackage (1)
MyPrompt.cs (1)
10public static ValueTask<string> Show(IJSRuntime jsRuntime, string message)
Wasm.Performance.TestApp (1)
BenchmarkEvent.cs (1)
10public static void Send(IJSRuntime jsRuntime, string name)