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;
395
var options =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue;
400
var isContainer =
_app
.Configuration.GetBool("DOTNET_RUNNING_IN_CONTAINER") ?? false;
407
var telemetryService =
_app
.Services.GetRequiredService<DashboardTelemetryService>();
423
_app
.Use(async (context, next) =>
442
_app
.UseCors();
445
_app
.UseMiddleware<ValidateTokenMiddleware>();
449
_app
.MapMcp("/mcp").RequireAuthorization(McpApiKeyAuthenticationHandler.PolicyName);
453
if (!
_app
.Environment.IsDevelopment())
455
_app
.UseExceptionHandler("/error");
458
_app
.UseHsts();
462
_app
.UseResponseCompression();
464
_app
.UseStatusCodePagesWithReExecute("/error/{0}");
468
_app
.UseHttpsRedirection();
471
_app
.UseStaticFiles(new StaticFileOptions()
489
_app
.UseForwardedHeaders();
492
_app
.UseAuthorization();
494
_app
.UseMiddleware<BrowserSecurityHeadersMiddleware>();
495
_app
.UseAntiforgery();
497
_app
.MapRazorComponents<App>().AddInteractiveServerRenderMode();
500
_app
.MapHttpOtlpApi(dashboardOptions.Otlp);
503
_app
.MapGrpcService<OtlpGrpcMetricsService>();
504
_app
.MapGrpcService<OtlpGrpcTraceService>();
505
_app
.MapGrpcService<OtlpGrpcLogsService>();
507
_app
.MapDashboardApi(dashboardOptions);
508
_app
.MapDashboardHealthChecks();
513
return
_app
.Services.GetRequiredService<ILoggerFactory>().CreateLogger<DashboardWebApplication>();
909
_app
.Run();
916
return
_app
.StartAsync(cancellationToken);
922
return
_app
.StopAsync(cancellationToken);
927
return
_app
.DisposeAsync();