1 write to Services
Microsoft.AspNetCore.Components.WebAssembly (1)
Hosting\WebAssemblyHostBuilder.cs (1)
78Services = new ServiceCollection();
38 references to Services
Microsoft.AspNetCore.Components.WebAssembly (22)
Hosting\WebAssemblyHostBuilder.cs (22)
79Logging = new LoggingBuilder(Services); 109return Services.BuildServiceProvider(options); 192Services.AddSingleton<IWebAssemblyHostEnvironment>(hostEnvironment); 288var container = factory.CreateBuilder(Services); 312Services.AddSingleton<IConfiguration>(Configuration); 325Services.AddSingleton<IJSRuntime>(DefaultWebAssemblyJSRuntime.Instance); 326Services.AddSingleton<NavigationManager>(WebAssemblyNavigationManager.Instance); 327Services.AddSingleton<INavigationInterception>(WebAssemblyNavigationInterception.Instance); 328Services.AddSingleton<IScrollToLocationHash>(WebAssemblyScrollToLocationHash.Instance); 329Services.AddSingleton(_jsMethods); 330Services.AddSingleton(new LazyAssemblyLoader(DefaultWebAssemblyJSRuntime.Instance)); 331Services.AddSingleton(_ => _rootComponentCache ?? new()); 332Services.AddSingleton<ComponentStatePersistenceManager>(); 333Services.AddSingleton(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State); 334Services.AddSupplyValueFromPersistentComponentStateProvider(); 335Services.AddSingleton<IErrorBoundaryLogger, WebAssemblyErrorBoundaryLogger>(); 336Services.AddSingleton<ResourceCollectionProvider>(); 337RegisterPersistentComponentStateServiceCollectionExtensions.AddPersistentServiceRegistration<ResourceCollectionProvider>(Services, RenderMode.InteractiveWebAssembly); 338Services.AddLogging(builder => 342Services.AddSingleton<AntiforgeryStateProvider, DefaultAntiforgeryStateProvider>(); 343RegisterPersistentComponentStateServiceCollectionExtensions.AddPersistentServiceRegistration<AntiforgeryStateProvider>(Services, RenderMode.InteractiveWebAssembly); 344Services.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>();