Skip to content

Commit 7758c92

Browse files
committed
Move LazyAssemblyLoader to Microsoft.JSInterop, register it in AddInteractiveWebAssemblyComponents
1 parent 9f2b088 commit 7758c92

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

src/Components/WebAssembly/Server/src/WebAssemblyRazorComponentsBuilderExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using Microsoft.AspNetCore.Components.Authorization;
66
using Microsoft.AspNetCore.Components.Endpoints.Infrastructure;
77
using Microsoft.AspNetCore.Components.WebAssembly.Server;
8+
using Microsoft.AspNetCore.Components.WebAssembly.Services;
89
using Microsoft.Extensions.DependencyInjection.Extensions;
910

1011
namespace Microsoft.Extensions.DependencyInjection;
@@ -24,6 +25,7 @@ public static IRazorComponentsBuilder AddInteractiveWebAssemblyComponents(this I
2425
ArgumentNullException.ThrowIfNull(builder, nameof(builder));
2526

2627
builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<RenderModeEndpointProvider, WebAssemblyEndpointProvider>());
28+
builder.Services.TryAddScoped<LazyAssemblyLoader>();
2729

2830
return builder;
2931
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System.Runtime.CompilerServices;
5+
6+
[assembly: TypeForwardedTo(typeof(Microsoft.AspNetCore.Components.WebAssembly.Services.LazyAssemblyLoader))]

src/JSInterop/Microsoft.JSInterop/src/PublicAPI.Unshipped.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#nullable enable
22
abstract Microsoft.JSInterop.JSInProcessRuntime.InvokeJS(in Microsoft.JSInterop.Infrastructure.JSInvocationInfo invocationInfo) -> string?
33
abstract Microsoft.JSInterop.JSRuntime.BeginInvokeJS(in Microsoft.JSInterop.Infrastructure.JSInvocationInfo invocationInfo) -> void
4+
Microsoft.AspNetCore.Components.WebAssembly.Services.LazyAssemblyLoader
5+
Microsoft.AspNetCore.Components.WebAssembly.Services.LazyAssemblyLoader.LazyAssemblyLoader(Microsoft.JSInterop.IJSRuntime! jsRuntime) -> void
6+
Microsoft.AspNetCore.Components.WebAssembly.Services.LazyAssemblyLoader.LoadAssembliesAsync(System.Collections.Generic.IEnumerable<string!>! assembliesToLoad) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.Reflection.Assembly!>!>!
47
Microsoft.JSInterop.IJSInProcessObjectReference.GetValue<TValue>(string! identifier) -> TValue
58
Microsoft.JSInterop.IJSInProcessObjectReference.InvokeNew(string! identifier, object?[]? args) -> Microsoft.JSInterop.IJSInProcessObjectReference!
69
Microsoft.JSInterop.IJSInProcessObjectReference.SetValue<TValue>(string! identifier, TValue value) -> void

0 commit comments

Comments
 (0)