2 writes to _app
Aspire.Dashboard (2)
DashboardWebApplication.cs (2)
166
_app
= builder.Build();
275
_app
= builder.Build();
29 references to _app
Aspire.Dashboard (29)
DashboardWebApplication.cs (29)
167
_dashboardOptionsMonitor =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
170
Services =
_app
.Services;
277
_dashboardOptionsMonitor =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
279
Services =
_app
.Services;
287
_app
.UseRequestLocalization(new RequestLocalizationOptions()
293
_app
.Lifetime.ApplicationStarted.Register(() =>
300
var corsOptions =
_app
.Services.GetRequiredService<IOptions<CorsOptions>>().Value;
336
var options =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue;
341
var isContainer =
_app
.Configuration.GetBool("DOTNET_RUNNING_IN_CONTAINER") ?? false;
350
_app
.Use(async (context, next) =>
369
_app
.UseCors();
372
_app
.UseMiddleware<ValidateTokenMiddleware>();
375
if (!
_app
.Environment.IsDevelopment())
377
_app
.UseExceptionHandler("/error");
380
_app
.UseHsts();
384
_app
.UseResponseCompression();
386
_app
.UseStatusCodePagesWithReExecute("/error/{0}");
390
_app
.UseHttpsRedirection();
393
_app
.UseStaticFiles(new StaticFileOptions()
408
_app
.UseAuthorization();
410
_app
.UseMiddleware<BrowserSecurityHeadersMiddleware>();
411
_app
.UseAntiforgery();
413
_app
.MapRazorComponents<App>().AddInteractiveServerRenderMode();
416
_app
.MapHttpOtlpApi(dashboardOptions.Otlp);
419
_app
.MapGrpcService<OtlpGrpcMetricsService>();
420
_app
.MapGrpcService<OtlpGrpcTraceService>();
421
_app
.MapGrpcService<OtlpGrpcLogsService>();
423
_app
.MapDashboardApi(dashboardOptions);
428
return
_app
.Services.GetRequiredService<ILoggerFactory>().CreateLogger<DashboardWebApplication>();