2 implementations of Services
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.Hosting.Tests (1)
102 references to Services
IStartupInjectionAssemblyName (1)
Microsoft.AspNetCore.FunctionalTests (1)
Microsoft.AspNetCore.Hosting (4)
Microsoft.AspNetCore.Hosting.Tests (77)
WebHostBuilderTests.cs (43)
33var options = CreateWebHostOptions(host.Services.GetRequiredService<IConfiguration>());
164var services = host.Services.GetServices<IHostApplicationLifetime>();
208Assert.NotNull(host.Services.GetService<ILoggerFactory>());
369Assert.NotNull(host.Services.GetService<IConfiguration>());
410var config = host.Services.GetService<IConfiguration>();
481Assert.NotNull(host.Services.GetRequiredService<ServiceA>());
482Assert.NotNull(host.Services.GetRequiredService<ServiceB>());
498var options = CreateWebHostOptions(host.Services.GetRequiredService<IConfiguration>());
524var options = CreateWebHostOptions(host.Services.GetRequiredService<IConfiguration>());
550var options = CreateWebHostOptions(host.Services.GetRequiredService<IConfiguration>());
585var options = CreateWebHostOptions(host.Services.GetRequiredService<IConfiguration>());
611Assert.Equal(expected, host.Services.GetService<IHostEnvironment>().EnvironmentName);
612Assert.Equal(expected, host.Services.GetService<IWebHostEnvironment>().EnvironmentName);
614Assert.Equal(expected, host.Services.GetService<AspNetCore.Hosting.IHostingEnvironment>().EnvironmentName);
615Assert.Equal(expected, host.Services.GetService<Extensions.Hosting.IHostingEnvironment>().EnvironmentName);
659Assert.Equal("/", host.Services.GetService<IHostEnvironment>().ContentRootPath);
660Assert.Equal("/", host.Services.GetService<IWebHostEnvironment>().ContentRootPath);
662Assert.Equal("/", host.Services.GetService<AspNetCore.Hosting.IHostingEnvironment>().ContentRootPath);
663Assert.Equal("/", host.Services.GetService<Extensions.Hosting.IHostingEnvironment>().ContentRootPath);
678var basePath = host.Services.GetRequiredService<IHostEnvironment>().ContentRootPath;
680var basePath2 = host.Services.GetService<AspNetCore.Hosting.IHostingEnvironment>().ContentRootPath;
701Assert.Equal(appBase, host.Services.GetService<IHostEnvironment>().ContentRootPath);
703Assert.Equal(appBase, host.Services.GetService<AspNetCore.Hosting.IHostingEnvironment>().ContentRootPath);
732var hostingEnv = host.Services.GetService<IHostEnvironment>();
734var hostingEnv2 = host.Services.GetService<AspNetCore.Hosting.IHostingEnvironment>();
750var hostingEnv = host.Services.GetService<IHostEnvironment>();
752var hostingEnv2 = host.Services.GetService<AspNetCore.Hosting.IHostingEnvironment>();
768var hostingEnv = host.Services.GetService<IHostEnvironment>();
781var hostingEnv = host.Services.GetService<IHostEnvironment>();
797var hostingEnv = host.Services.GetService<IHostEnvironment>();
813var hostingEnv = host.Services.GetService<IHostEnvironment>();
827var hostingEnv = host.Services.GetService<IHostEnvironment>();
879var factoryFromHost = host.Services.GetService<ILoggerFactory>();
955var startup = host.Services.GetRequiredService<StartupVerifyServiceA>();
1076var sink = host.Services.GetRequiredService<ITestSink>();
1092var configuration = host.Services.GetRequiredService<IConfiguration>();
1128var configuration = host.Services.GetRequiredService<IConfiguration>();
1229var sink = host.Services.GetRequiredService<ITestSink>();
1281var options = CreateWebHostOptions(host.Services.GetRequiredService<IConfiguration>());
1301var filter = (MyStartupFilter)host.Services.GetServices<IStartupFilter>().FirstOrDefault(s => s is MyStartupFilter);
1337var appConfig = host.Services.GetRequiredService<IConfiguration>();
1378var service = host.Services.GetServices<IHostedService>().OfType<NonThrowingHostedService>().First();
1408var ordering = host.Services.GetRequiredService<StartOrder>();
Microsoft.AspNetCore.Hosting.WindowsServices (1)
Microsoft.AspNetCore.Hosting.WindowsServices.Tests (2)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Microsoft.AspNetCore.Mvc.Testing (1)
Microsoft.AspNetCore.Server.Kestrel.Tests (6)
Microsoft.AspNetCore.TestHost (2)
Microsoft.AspNetCore.TestHost.Tests (1)
Microsoft.AspNetCore.Tests (5)