2 writes to _app
Aspire.Dashboard (2)
DashboardWebApplication.cs (2)
182
_app
= builder.Build();
330
_app
= builder.Build();
37 references to _app
Aspire.Dashboard (37)
DashboardWebApplication.cs (37)
183
_dashboardOptionsMonitor =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
186
Services =
_app
.Services;
332
_dashboardOptionsMonitor =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
334
Services =
_app
.Services;
342
_app
.UseRequestLocalization(new RequestLocalizationOptions()
348
_app
.Lifetime.ApplicationStarted.Register(() =>
355
var corsOptions =
_app
.Services.GetRequiredService<IOptions<CorsOptions>>().Value;
401
var options =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue;
406
var isContainer =
_app
.Configuration.GetBool("DOTNET_RUNNING_IN_CONTAINER") ?? false;
413
var telemetryService =
_app
.Services.GetRequiredService<DashboardTelemetryService>();
429
_app
.Use(async (context, next) =>
448
_app
.UseCors();
451
_app
.UseMiddleware<ValidateTokenMiddleware>();
454
if (!
_app
.Environment.IsDevelopment())
456
_app
.UseExceptionHandler("/error");
459
_app
.UseHsts();
463
_app
.UseResponseCompression();
465
_app
.UseStatusCodePagesWithReExecute("/error/{0}");
469
_app
.UseHttpsRedirection();
472
_app
.UseStaticFiles(new StaticFileOptions()
490
_app
.UseForwardedHeaders();
493
_app
.UseAuthorization();
495
_app
.UseMiddleware<BrowserSecurityHeadersMiddleware>();
496
_app
.UseAntiforgery();
498
_app
.MapRazorComponents<App>().AddInteractiveServerRenderMode();
501
_app
.MapHttpOtlpApi(dashboardOptions.Otlp);
504
_app
.MapGrpcService<OtlpGrpcMetricsService>();
505
_app
.MapGrpcService<OtlpGrpcTraceService>();
506
_app
.MapGrpcService<OtlpGrpcLogsService>();
508
_app
.MapDashboardMcp(dashboardOptions);
509
_app
.MapDashboardApi(dashboardOptions);
510
_app
.MapDashboardHealthChecks();
515
return
_app
.Services.GetRequiredService<ILoggerFactory>().CreateLogger<DashboardWebApplication>();
912
_app
.Run();
919
return
_app
.StartAsync(cancellationToken);
925
return
_app
.StopAsync(cancellationToken);
930
return
_app
.DisposeAsync();