2 writes to _app
Aspire.Dashboard (2)
DashboardWebApplication.cs (2)
182
_app
= builder.Build();
329
_app
= builder.Build();
37 references to _app
Aspire.Dashboard (37)
DashboardWebApplication.cs (37)
183
_dashboardOptionsMonitor =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
186
Services =
_app
.Services;
331
_dashboardOptionsMonitor =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
333
Services =
_app
.Services;
341
_app
.UseRequestLocalization(new RequestLocalizationOptions()
347
_app
.Lifetime.ApplicationStarted.Register(() =>
354
var corsOptions =
_app
.Services.GetRequiredService<IOptions<CorsOptions>>().Value;
400
var options =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue;
405
var isContainer =
_app
.Configuration.GetBool("DOTNET_RUNNING_IN_CONTAINER") ?? false;
412
var telemetryService =
_app
.Services.GetRequiredService<DashboardTelemetryService>();
428
_app
.Use(async (context, next) =>
447
_app
.UseCors();
450
_app
.UseMiddleware<ValidateTokenMiddleware>();
454
_app
.MapMcp("/mcp").RequireAuthorization(McpApiKeyAuthenticationHandler.PolicyName);
458
if (!
_app
.Environment.IsDevelopment())
460
_app
.UseExceptionHandler("/error");
463
_app
.UseHsts();
467
_app
.UseResponseCompression();
469
_app
.UseStatusCodePagesWithReExecute("/error/{0}");
473
_app
.UseHttpsRedirection();
476
_app
.UseStaticFiles(new StaticFileOptions()
494
_app
.UseForwardedHeaders();
497
_app
.UseAuthorization();
499
_app
.UseMiddleware<BrowserSecurityHeadersMiddleware>();
500
_app
.UseAntiforgery();
502
_app
.MapRazorComponents<App>().AddInteractiveServerRenderMode();
505
_app
.MapHttpOtlpApi(dashboardOptions.Otlp);
508
_app
.MapGrpcService<OtlpGrpcMetricsService>();
509
_app
.MapGrpcService<OtlpGrpcTraceService>();
510
_app
.MapGrpcService<OtlpGrpcLogsService>();
512
_app
.MapDashboardApi(dashboardOptions);
513
_app
.MapDashboardHealthChecks();
518
return
_app
.Services.GetRequiredService<ILoggerFactory>().CreateLogger<DashboardWebApplication>();
915
_app
.Run();
922
return
_app
.StartAsync(cancellationToken);
928
return
_app
.StopAsync(cancellationToken);
933
return
_app
.DisposeAsync();