2 writes to _applicationServices
Microsoft.AspNetCore.Hosting (2)
Internal\WebHost.cs (2)
107_applicationServices = _applicationServiceCollection.BuildServiceProvider(); 177_applicationServices = _startup.ConfigureServices(_applicationServiceCollection);
22 references to _applicationServices
Microsoft.AspNetCore.Hosting (22)
Internal\WebHost.cs (22)
81Debug.Assert(_applicationServices != null, "Initialize must be called before accessing services."); 82return _applicationServices; 105if (_applicationServices == null) 126Debug.Assert(_applicationServices != null, "Initialize must be called first."); 129_logger = _applicationServices.GetRequiredService<ILoggerFactory>().CreateLogger("Microsoft.AspNetCore.Hosting.Diagnostics"); 134_applicationLifetime = _applicationServices.GetRequiredService<ApplicationLifetime>(); 135_hostedServiceExecutor = _applicationServices.GetRequiredService<HostedServiceExecutor>(); 140var diagnosticSource = _applicationServices.GetRequiredService<DiagnosticListener>(); 141var activitySource = _applicationServices.GetRequiredService<ActivitySource>(); 142var propagator = _applicationServices.GetRequiredService<DistributedContextPropagator>(); 143var httpContextFactory = _applicationServices.GetRequiredService<IHttpContextFactory>(); 144var hostingMetrics = _applicationServices.GetRequiredService<HostingMetrics>(); 174if (_applicationServices == null) 202Debug.Assert(_applicationServices != null, "Initialize must be called first."); 209var builderFactory = _applicationServices.GetRequiredService<IApplicationBuilderFactory>(); 211builder.ApplicationServices = _applicationServices; 213var startupFilters = _applicationServices.GetService<IEnumerable<IStartupFilter>>(); 234var logger = _applicationServices.GetRequiredService<ILogger<WebHost>>(); 245var hostingEnv = _applicationServices.GetRequiredService<IHostEnvironment>(); 255Debug.Assert(_applicationServices != null, "Initialize must be called first."); 259Server = _applicationServices.GetRequiredService<IServer>(); 332await DisposeServiceProviderAsync(_applicationServices).ConfigureAwait(false);