2 writes to _app
Aspire.Dashboard (2)
DashboardWebApplication.cs (2)
164
_app
= builder.Build();
270
_app
= builder.Build();
29 references to _app
Aspire.Dashboard (29)
DashboardWebApplication.cs (29)
165
_dashboardOptionsMonitor =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
168
Services =
_app
.Services;
272
_dashboardOptionsMonitor =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
274
Services =
_app
.Services;
282
_app
.UseRequestLocalization(new RequestLocalizationOptions()
288
_app
.Lifetime.ApplicationStarted.Register(() =>
295
var corsOptions =
_app
.Services.GetRequiredService<IOptions<CorsOptions>>().Value;
331
var options =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue;
336
var isContainer =
_app
.Configuration.GetBool("DOTNET_RUNNING_IN_CONTAINER") ?? false;
345
_app
.Use(async (context, next) =>
364
_app
.UseCors();
367
_app
.UseMiddleware<ValidateTokenMiddleware>();
370
if (!
_app
.Environment.IsDevelopment())
372
_app
.UseExceptionHandler("/error");
375
_app
.UseHsts();
379
_app
.UseResponseCompression();
381
_app
.UseStatusCodePagesWithReExecute("/error/{0}");
385
_app
.UseHttpsRedirection();
388
_app
.UseStaticFiles(new StaticFileOptions()
403
_app
.UseAuthorization();
405
_app
.UseMiddleware<BrowserSecurityHeadersMiddleware>();
406
_app
.UseAntiforgery();
408
_app
.MapRazorComponents<App>().AddInteractiveServerRenderMode();
411
_app
.MapHttpOtlpApi(dashboardOptions.Otlp);
414
_app
.MapGrpcService<OtlpGrpcMetricsService>();
415
_app
.MapGrpcService<OtlpGrpcTraceService>();
416
_app
.MapGrpcService<OtlpGrpcLogsService>();
418
_app
.MapDashboardApi(dashboardOptions);
423
return
_app
.Services.GetRequiredService<ILoggerFactory>().CreateLogger<DashboardWebApplication>();