2 writes to _app
Aspire.Dashboard (2)
DashboardWebApplication.cs (2)
173
_app
= builder.Build();
303
_app
= builder.Build();
36 references to _app
Aspire.Dashboard (36)
DashboardWebApplication.cs (36)
174
_dashboardOptionsMonitor =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
177
Services =
_app
.Services;
305
_dashboardOptionsMonitor =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
307
Services =
_app
.Services;
315
_app
.UseRequestLocalization(new RequestLocalizationOptions()
321
_app
.Lifetime.ApplicationStarted.Register(() =>
328
var corsOptions =
_app
.Services.GetRequiredService<IOptions<CorsOptions>>().Value;
364
var options =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue;
369
var isContainer =
_app
.Configuration.GetBool("DOTNET_RUNNING_IN_CONTAINER") ?? false;
376
var telemetryService =
_app
.Services.GetRequiredService<DashboardTelemetryService>();
392
_app
.Use(async (context, next) =>
411
_app
.UseCors();
414
_app
.UseMiddleware<ValidateTokenMiddleware>();
417
if (!
_app
.Environment.IsDevelopment())
419
_app
.UseExceptionHandler("/error");
422
_app
.UseHsts();
426
_app
.UseResponseCompression();
428
_app
.UseStatusCodePagesWithReExecute("/error/{0}");
432
_app
.UseHttpsRedirection();
435
_app
.UseStaticFiles(new StaticFileOptions()
453
_app
.UseForwardedHeaders();
456
_app
.UseAuthorization();
458
_app
.UseMiddleware<BrowserSecurityHeadersMiddleware>();
459
_app
.UseAntiforgery();
461
_app
.MapRazorComponents<App>().AddInteractiveServerRenderMode();
464
_app
.MapHttpOtlpApi(dashboardOptions.Otlp);
467
_app
.MapGrpcService<OtlpGrpcMetricsService>();
468
_app
.MapGrpcService<OtlpGrpcTraceService>();
469
_app
.MapGrpcService<OtlpGrpcLogsService>();
471
_app
.MapDashboardApi(dashboardOptions);
472
_app
.MapDashboardHealthChecks();
477
return
_app
.Services.GetRequiredService<ILoggerFactory>().CreateLogger<DashboardWebApplication>();
875
_app
.Run();
882
return
_app
.StartAsync(cancellationToken);
888
return
_app
.StopAsync(cancellationToken);
893
return
_app
.DisposeAsync();