2 writes to _app
Aspire.Dashboard (2)
DashboardWebApplication.cs (2)
169
_app
= builder.Build();
299
_app
= builder.Build();
36 references to _app
Aspire.Dashboard (36)
DashboardWebApplication.cs (36)
170
_dashboardOptionsMonitor =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
173
Services =
_app
.Services;
301
_dashboardOptionsMonitor =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
303
Services =
_app
.Services;
311
_app
.UseRequestLocalization(new RequestLocalizationOptions()
317
_app
.Lifetime.ApplicationStarted.Register(() =>
324
var corsOptions =
_app
.Services.GetRequiredService<IOptions<CorsOptions>>().Value;
360
var options =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue;
365
var isContainer =
_app
.Configuration.GetBool("DOTNET_RUNNING_IN_CONTAINER") ?? false;
372
var telemetryService =
_app
.Services.GetRequiredService<DashboardTelemetryService>();
388
_app
.Use(async (context, next) =>
407
_app
.UseCors();
410
_app
.UseMiddleware<ValidateTokenMiddleware>();
413
if (!
_app
.Environment.IsDevelopment())
415
_app
.UseExceptionHandler("/error");
418
_app
.UseHsts();
422
_app
.UseResponseCompression();
424
_app
.UseStatusCodePagesWithReExecute("/error/{0}");
428
_app
.UseHttpsRedirection();
431
_app
.UseStaticFiles(new StaticFileOptions()
449
_app
.UseForwardedHeaders();
452
_app
.UseAuthorization();
454
_app
.UseMiddleware<BrowserSecurityHeadersMiddleware>();
455
_app
.UseAntiforgery();
457
_app
.MapRazorComponents<App>().AddInteractiveServerRenderMode();
460
_app
.MapHttpOtlpApi(dashboardOptions.Otlp);
463
_app
.MapGrpcService<OtlpGrpcMetricsService>();
464
_app
.MapGrpcService<OtlpGrpcTraceService>();
465
_app
.MapGrpcService<OtlpGrpcLogsService>();
467
_app
.MapDashboardApi(dashboardOptions);
468
_app
.MapDashboardHealthChecks();
473
return
_app
.Services.GetRequiredService<ILoggerFactory>().CreateLogger<DashboardWebApplication>();
871
_app
.Run();
878
return
_app
.StartAsync(cancellationToken);
884
return
_app
.StopAsync(cancellationToken);
889
return
_app
.DisposeAsync();