11 writes to ApplicationServices
InMemory.FunctionalTests (2)
HttpsConnectionMiddlewareTests.cs (1)
40serverOptions.ApplicationServices = new ServiceCollection()
HttpsTests.cs (1)
38serverOptions.ApplicationServices = new ServiceCollection()
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\KestrelServerOptionsSetup.cs (1)
19options.ApplicationServices = _services;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (7)
AddressBinderTests.cs (1)
297ApplicationServices = services.BuildServiceProvider()
KestrelServerOptionsTests.cs (2)
71ApplicationServices = new ServiceCollection().BuildServiceProvider() 88options.ApplicationServices = serviceCollection.BuildServiceProvider();
KestrelServerTests.cs (3)
37serverOptions.ApplicationServices = new ServiceCollection() 797ApplicationServices = serviceCollection.BuildServiceProvider(), 935ApplicationServices = serviceCollection.BuildServiceProvider(),
ListenOptionsTests.cs (1)
29ApplicationServices = serviceProvider
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
KestrelConfigurationLoaderTests.cs (1)
27serverOptions.ApplicationServices = new ServiceCollection()
22 references to ApplicationServices
Aspire.Dashboard (1)
DashboardWebApplication.cs (1)
569var logger = serverOptions.ApplicationServices.GetRequiredService<ILogger<DashboardWebApplication>>();
InMemory.FunctionalTests (1)
HttpsConnectionMiddlewareTests.cs (1)
82var loader = new KestrelConfigurationLoader(options, configuration, options.ApplicationServices.GetRequiredService<IHttpsConfigurationService>(), certificatePathWatcher: null, reloadOnChange: false);
Microsoft.AspNetCore.Server.Kestrel.Core (17)
KestrelServerOptions.cs (11)
295Debug.Assert(ApplicationServices.GetRequiredService<IHttpsConfigurationService>().IsInitialized, "HTTPS configuration should have been enabled"); 313var logger = ApplicationServices!.GetRequiredService<ILogger<KestrelServer>>(); 322var httpsConfigurationService = ApplicationServices.GetRequiredService<IHttpsConfigurationService>(); 326var hostEnvironment = ApplicationServices.GetRequiredService<IHostEnvironment>(); 327var logger = ApplicationServices.GetRequiredService<ILogger<KestrelServer>>(); 328var httpsLogger = ApplicationServices.GetRequiredService<ILogger<HttpsConnectionMiddleware>>(); 453if (ApplicationServices is null) 455throw new InvalidOperationException($"{nameof(ApplicationServices)} must not be null. This is normally set automatically via {nameof(IConfigureOptions<KestrelServerOptions>)}."); 458var httpsConfigurationService = ApplicationServices.GetRequiredService<IHttpsConfigurationService>(); 461ApplicationServices.GetRequiredService<IHostEnvironment>(), 462ApplicationServices.GetRequiredService<ILogger<CertificatePathWatcher>>())
ListenOptions.cs (1)
132public IServiceProvider ApplicationServices => KestrelServerOptions?.ApplicationServices!; // TODO - Always available?
ListenOptionsHttpsExtensions.cs (4)
194var loggerFactory = listenOptions.KestrelServerOptions.ApplicationServices.GetRequiredService<ILoggerFactory>(); 195var metrics = listenOptions.KestrelServerOptions.ApplicationServices.GetRequiredService<KestrelMetrics>(); 257var loggerFactory = listenOptions.KestrelServerOptions.ApplicationServices.GetRequiredService<ILoggerFactory>(); 258var metrics = listenOptions.KestrelServerOptions.ApplicationServices.GetRequiredService<KestrelMetrics>();
Middleware\ListenOptionsConnectionLoggingExtensions.cs (1)
36var loggerFactory = listenOptions.KestrelServerOptions.ApplicationServices.GetRequiredService<ILoggerFactory>();
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
KestrelServerTests.cs (1)
298if (options?.ApplicationServices is IServiceProvider serviceProvider)
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
WebHostBuilderKestrelExtensionsTests.cs (2)
31Assert.NotNull(options.ApplicationServices); 47Assert.NotNull(options.ApplicationServices);