17 references to Services
BasicTestApp (1)
Program.cs (1)
67
uri = new Uri(host.
Services
.GetService<NavigationManager>().Uri);
Microsoft.AspNetCore.Components.WebAssembly (4)
Hosting\WebAssemblyHost.cs (4)
134
var manager =
Services
.GetRequiredService<ComponentStatePersistenceManager>();
151
var loggerFactory =
Services
.GetRequiredService<ILoggerFactory>();
153
var collectionProvider =
Services
.GetRequiredService<ResourceCollectionProvider>();
155
_renderer = new WebAssemblyRenderer(
Services
, collection, loggerFactory, jsComponentInterop);
Microsoft.AspNetCore.Components.WebAssembly.Tests (12)
Hosting\WebAssemblyHostBuilderTest.cs (11)
48
Assert.NotNull(host.
Services
.GetRequiredService<StringBuilder>());
66
Assert.NotNull(host.
Services
.GetRequiredService<StringBuilder>());
88
Assert.NotNull(host.
Services
.GetRequiredService<StringBuilder>());
89
Assert.NotNull(host.
Services
.GetRequiredService<List<string>>());
105
Assert.NotNull(host.
Services
.GetRequiredService<StringBuilder>());
106
Assert.Throws<InvalidOperationException>(() => host.
Services
.GetRequiredService<TestServiceThatTakesStringBuilder>());
122
Assert.NotNull(host.
Services
.GetRequiredService<StringBuilder>());
123
Assert.NotNull(host.
Services
.GetRequiredService<TestServiceThatTakesStringBuilder>());
147
var navigationManager = host.
Services
.GetRequiredService<NavigationManager>();
202
var configuration = host.
Services
.GetRequiredService<IConfiguration>();
246
var loggerProvider = host.
Services
.GetRequiredService<ILoggerProvider>();
Hosting\WebAssemblyHostTest.cs (1)
69
var disposable = host.
Services
.GetRequiredService<DisposableService>();