1 write to Services
Microsoft.AspNetCore.Components.WebAssembly (1)
Hosting\WebAssemblyHostBuilder.cs (1)
73Services = new ServiceCollection();
38 references to Services
Microsoft.AspNetCore.Components.WebAssembly (22)
Hosting\WebAssemblyHostBuilder.cs (22)
74Logging = new LoggingBuilder(Services); 104return Services.BuildServiceProvider(options); 187Services.AddSingleton<IWebAssemblyHostEnvironment>(hostEnvironment); 283var container = factory.CreateBuilder(Services); 307Services.AddSingleton<IConfiguration>(Configuration); 320Services.AddSingleton<IJSRuntime>(DefaultWebAssemblyJSRuntime.Instance); 321Services.AddSingleton<NavigationManager>(WebAssemblyNavigationManager.Instance); 322Services.AddSingleton<INavigationInterception>(WebAssemblyNavigationInterception.Instance); 323Services.AddSingleton<IScrollToLocationHash>(WebAssemblyScrollToLocationHash.Instance); 324Services.AddSingleton(_jsMethods); 325Services.AddSingleton(new LazyAssemblyLoader(DefaultWebAssemblyJSRuntime.Instance)); 326Services.AddSingleton(_ => _rootComponentCache ?? new()); 327Services.AddSingleton<ComponentStatePersistenceManager>(); 328Services.AddSingleton(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State); 329Services.AddSupplyValueFromPersistentComponentStateProvider(); 330Services.AddSingleton<IErrorBoundaryLogger, WebAssemblyErrorBoundaryLogger>(); 331Services.AddSingleton<ResourceCollectionProvider>(); 332RegisterPersistentComponentStateServiceCollectionExtensions.AddPersistentServiceRegistration<ResourceCollectionProvider>(Services, RenderMode.InteractiveWebAssembly); 333Services.AddLogging(builder => 337Services.AddSingleton<AntiforgeryStateProvider, DefaultAntiforgeryStateProvider>(); 338RegisterPersistentComponentStateServiceCollectionExtensions.AddPersistentServiceRegistration<AntiforgeryStateProvider>(Services, RenderMode.InteractiveWebAssembly); 339Services.AddSupplyValueFromQueryProvider();
Microsoft.AspNetCore.Components.WebAssembly.Tests (16)
Hosting\WebAssemblyHostBuilderTest.cs (12)
42builder.Services.AddScoped<StringBuilder>(); 57builder.Services.AddScoped<StringBuilder>(); 75builder.Services.AddScoped<StringBuilder>(); 98builder.Services.AddScoped<StringBuilder>(); 99builder.Services.AddSingleton<TestServiceThatTakesStringBuilder>(); 112builder.Services.AddScoped<StringBuilder>(); 113builder.Services.AddSingleton<TestServiceThatTakesStringBuilder>(); 227Assert.Single(builder.Services, d => d.ServiceType == type); 256builder.Services.AddScoped<CircularServiceA>(); 257builder.Services.AddScoped<CircularServiceB>(); 295builder.Services.AddScoped<CircularServiceA>(); 296builder.Services.AddScoped<CircularServiceB>();
Hosting\WebAssemblyHostTest.cs (4)
22builder.Services.AddSingleton(Mock.Of<IJSRuntime>()); 42builder.Services.AddSingleton(Mock.Of<IJSRuntime>()); 64builder.Services.AddSingleton(Mock.Of<IJSRuntime>()); 65builder.Services.AddSingleton<DisposableService>();