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)
81
Debug.Assert(
_applicationServices
!= null, "Initialize must be called before accessing services.");
82
return
_applicationServices
;
105
if (
_applicationServices
== null)
126
Debug.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>();
140
var diagnosticSource =
_applicationServices
.GetRequiredService<DiagnosticListener>();
141
var activitySource =
_applicationServices
.GetRequiredService<ActivitySource>();
142
var propagator =
_applicationServices
.GetRequiredService<DistributedContextPropagator>();
143
var httpContextFactory =
_applicationServices
.GetRequiredService<IHttpContextFactory>();
144
var hostingMetrics =
_applicationServices
.GetRequiredService<HostingMetrics>();
174
if (
_applicationServices
== null)
202
Debug.Assert(
_applicationServices
!= null, "Initialize must be called first.");
209
var builderFactory =
_applicationServices
.GetRequiredService<IApplicationBuilderFactory>();
211
builder.ApplicationServices =
_applicationServices
;
213
var startupFilters =
_applicationServices
.GetService<IEnumerable<IStartupFilter>>();
234
var logger =
_applicationServices
.GetRequiredService<ILogger<WebHost>>();
245
var hostingEnv =
_applicationServices
.GetRequiredService<IHostEnvironment>();
255
Debug.Assert(
_applicationServices
!= null, "Initialize must be called first.");
259
Server =
_applicationServices
.GetRequiredService<IServer>();
332
await DisposeServiceProviderAsync(
_applicationServices
).ConfigureAwait(false);