1 implementation of Services
Microsoft.AspNetCore.Hosting (1)
Internal\WebHost.cs (1)
78public IServiceProvider Services
27 references to Services
Microsoft.AspNetCore.Hosting (4)
WebHostExtensions.cs (4)
93var shutdownMessage = host.Services.GetRequiredService<WebHostOptions>().SuppressStatusMessages ? string.Empty : "Application is shutting down..."; 114var hostingEnvironment = host.Services.GetService<IHostEnvironment>(); 115var options = host.Services.GetRequiredService<WebHostOptions>(); 154var applicationLifetime = host.Services.GetRequiredService<IHostApplicationLifetime>();
Microsoft.AspNetCore.Hosting.WindowsServices (1)
WebHostService.cs (1)
50.Services
Microsoft.AspNetCore.Mvc.Testing (2)
WebApplicationFactory.cs (2)
110return _webHost?.Services ?? _host!.Services; 114return _host?.Services ?? _server!.Host.Services;
Microsoft.AspNetCore.TestHost (2)
TestServer.cs (1)
106Services = host.Services;
WebHostBuilderExtensions.cs (1)
60return (TestServer)host.Services.GetRequiredService<IServer>();
Microsoft.Extensions.Diagnostics.Probes.Tests (18)
KubernetesProbesExtensionsTests.cs (6)
36var hostedServices = host.Services.GetServices<IHostedService>().Where(service => service.GetType().Name == "TcpEndpointProbesService"); 37var configurations = host.Services.GetServices<IOptionsMonitor<TcpEndpointProbesOptions>>(); 80var hostedServices = host.Services.GetServices<IHostedService>().Where(service => service.GetType().Name == "TcpEndpointProbesService"); 81var configurations = host.Services.GetServices<IOptionsMonitor<TcpEndpointProbesOptions>>(); 108var hostedServices = host.Services.GetServices<IHostedService>().Where(service => service.GetType().Name == "TcpEndpointProbesService"); 109var configurations = host.Services.GetServices<IOptionsMonitor<TcpEndpointProbesOptions>>();
TcpEndpointProbesExtensionsTests.cs (12)
36var hostedServices = host.Services.GetServices<IHostedService>().Where(x => x is TcpEndpointProbesService); 55var hostedServices = host.Services.GetServices<IHostedService>().Where(x => x is TcpEndpointProbesService); 56var configurations = host.Services.GetServices<IOptions<TcpEndpointProbesOptions>>(); 73var hostedServices = host.Services.GetServices<IHostedService>().Where(x => x is TcpEndpointProbesService); 92var hostedServices = host.Services.GetServices<IHostedService>().Where(x => x is TcpEndpointProbesService); 93var configurations = host.Services.GetServices<IOptionsMonitor<TcpEndpointProbesOptions>>(); 118var hostedServices = host.Services.GetServices<IHostedService>().Where(x => x is TcpEndpointProbesService); 119var configurations = host.Services.GetServices<IOptions<TcpEndpointProbesOptions>>(); 143var hostedServices = host.Services.GetServices<IHostedService>().Where(x => x is TcpEndpointProbesService); 144var configurations = host.Services.GetServices<IOptionsMonitor<TcpEndpointProbesOptions>>(); 164var hostedServices = host.Services.GetServices<IHostedService>().Where(x => x is TcpEndpointProbesService); 165var configurations = host.Services.GetServices<IOptionsMonitor<TcpEndpointProbesOptions>>();