2 writes to _app
Aspire.Dashboard (2)
DashboardWebApplication.cs (2)
164
_app
= builder.Build();
271
_app
= builder.Build();
29 references to _app
Aspire.Dashboard (29)
DashboardWebApplication.cs (29)
165
_dashboardOptionsMonitor =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
168
Services =
_app
.Services;
273
_dashboardOptionsMonitor =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
275
Services =
_app
.Services;
283
_app
.UseRequestLocalization(new RequestLocalizationOptions()
289
_app
.Lifetime.ApplicationStarted.Register(() =>
296
var corsOptions =
_app
.Services.GetRequiredService<IOptions<CorsOptions>>().Value;
332
var options =
_app
.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue;
337
var isContainer =
_app
.Configuration.GetBool("DOTNET_RUNNING_IN_CONTAINER") ?? false;
346
_app
.Use(async (context, next) =>
365
_app
.UseCors();
368
_app
.UseMiddleware<ValidateTokenMiddleware>();
371
if (!
_app
.Environment.IsDevelopment())
373
_app
.UseExceptionHandler("/error");
376
_app
.UseHsts();
380
_app
.UseResponseCompression();
382
_app
.UseStatusCodePagesWithReExecute("/error/{0}");
386
_app
.UseHttpsRedirection();
389
_app
.UseStaticFiles(new StaticFileOptions()
404
_app
.UseAuthorization();
406
_app
.UseMiddleware<BrowserSecurityHeadersMiddleware>();
407
_app
.UseAntiforgery();
409
_app
.MapRazorComponents<App>().AddInteractiveServerRenderMode();
412
_app
.MapHttpOtlpApi(dashboardOptions.Otlp);
415
_app
.MapGrpcService<OtlpGrpcMetricsService>();
416
_app
.MapGrpcService<OtlpGrpcTraceService>();
417
_app
.MapGrpcService<OtlpGrpcLogsService>();
419
_app
.MapDashboardApi(dashboardOptions);
424
return
_app
.Services.GetRequiredService<ILoggerFactory>().CreateLogger<DashboardWebApplication>();