26 instantiations of DashboardOptions
Aspire.Dashboard (1)
DashboardWebApplication.cs (1)
546dashboardOptions = new DashboardOptions();
Aspire.Dashboard.Components.Tests (6)
Pages\ConsoleLogsTests.cs (1)
831Services.AddSingleton<IOptions<DashboardOptions>>(Options.Create(new DashboardOptions()));
Pages\StructuredLogsTests.cs (1)
242Services.AddSingleton<IOptions<DashboardOptions>>(Options.Create(new DashboardOptions()));
Pages\TraceDetailsTests.cs (1)
647Services.AddSingleton<IOptions<DashboardOptions>>(Options.Create(new DashboardOptions()));
Shared\MetricsSetupHelpers.cs (1)
90context.Services.AddSingleton<IOptions<DashboardOptions>>(Options.Create(new DashboardOptions()));
Shared\ResourceSetupHelpers.cs (1)
112context.Services.AddSingleton(Options.Create(new DashboardOptions()));
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
268Options.Create(new DashboardOptions { TelemetryLimits = options }),
Aspire.Dashboard.Tests (19)
DashboardOptionsTests.cs (1)
22return new()
Integration\DashboardClientAuthTests.cs (1)
114var options = new DashboardOptions
Markdown\MarkdownProcessorTests.cs (1)
375new TestOptionsMonitor<DashboardOptions>(new DashboardOptions()));
Mcp\AspireResourceMcpToolsTests.cs (1)
219var options = new DashboardOptions();
Mcp\AspireTelemetryMcpToolsTests.cs (1)
233var options = new DashboardOptions();
Model\AIAssistant\AIContextProviderTests.cs (1)
123var testOptionsMonitor = new TestOptionsMonitor<DashboardOptions>(new DashboardOptions());
Model\AIAssistant\AIHelpersTests.cs (3)
183var options = new DashboardOptions(); 199var options = new DashboardOptions(); 214var options = new DashboardOptions();
Model\AIAssistant\AssistantChatDataContextTests.cs (1)
135new TestOptionsMonitor<DashboardOptions>(new DashboardOptions()));
Model\DashboardClientTests.cs (1)
26var options = new DashboardOptions
OtlpApiKeyAuthenticationHandlerTests.cs (1)
78var options = new DashboardOptions
Telemetry\DashboardTelemetrySenderTests.cs (4)
21var options = new TestDashboardOptions(new DashboardOptions 35var options = new TestDashboardOptions(new DashboardOptions 62var options = new TestDashboardOptions(new DashboardOptions 109var options = new TestDashboardOptions(new DashboardOptions
Telemetry\DashboardTelemetryServiceTests.cs (2)
25var options = new TestDashboardOptions(new DashboardOptions 86var options = new TestDashboardOptions(new DashboardOptions
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
268Options.Create(new DashboardOptions { TelemetryLimits = options }),
130 references to DashboardOptions
Aspire.Dashboard (80)
Authentication\FrontendCompositeAuthenticationHandler.cs (1)
13IOptionsMonitor<DashboardOptions> dashboardOptions,
Authentication\OtlpApiKey\OtlpApiKeyAuthenticationHandler.cs (2)
15private readonly IOptionsMonitor<DashboardOptions> _dashboardOptions; 17public OtlpApiKeyAuthenticationHandler(IOptionsMonitor<DashboardOptions> dashboardOptions, IOptionsMonitor<OtlpApiKeyAuthenticationHandlerOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Authentication\OtlpCompositeAuthenticationHandler.cs (2)
16IOptionsMonitor<DashboardOptions> dashboardOptions, 24var options = dashboardOptions.CurrentValue;
Components\Controls\UserProfile.razor.cs (1)
18public required IOptionsMonitor<DashboardOptions> DashboardOptions { get; init; }
Components\Dialogs\McpServerDialog.razor.cs (1)
33public required IOptions<DashboardOptions> DashboardOptions { get; init; }
Components\Layout\MainLayout.razor.cs (1)
72public required IOptionsMonitor<DashboardOptions> Options { get; init; }
Components\Pages\ConsoleLogs.razor.cs (1)
72public required IOptions<DashboardOptions> Options { get; init; }
Components\Pages\Resources.razor.cs (1)
63public required IOptionsMonitor<DashboardOptions> DashboardOptions { get; init; }
Components\Pages\StructuredLogs.razor.cs (1)
90public required IOptions<DashboardOptions> DashboardOptions { get; init; }
Components\Pages\Traces.razor.cs (1)
74public required IOptions<DashboardOptions> DashboardOptions { get; init; }
Configuration\PostConfigureDashboardOptions.cs (3)
10public sealed class PostConfigureDashboardOptions : IPostConfigureOptions<DashboardOptions> 25public void PostConfigure(string? name, DashboardOptions options) 27_logger.LogDebug($"PostConfigure {nameof(DashboardOptions)} with name '{name}'.");
Configuration\ValidateDashboardOptions.cs (3)
10public sealed class ValidateDashboardOptions : IValidateOptions<DashboardOptions> 23public ValidateOptionsResult Validate(string? name, DashboardOptions options) 25_logger.LogDebug($"Validating {nameof(DashboardOptions)}.");
DashboardEndpointsBuilder.cs (2)
22public static void MapDashboardApi(this IEndpointRouteBuilder endpoints, DashboardOptions dashboardOptions) 26endpoints.MapPost("/api/validatetoken", async (string token, HttpContext httpContext, IOptionsMonitor<DashboardOptions> dashboardOptions) =>
DashboardWebApplication.cs (17)
55private readonly IOptionsMonitor<DashboardOptions> _dashboardOptionsMonitor; 107public IOptionsMonitor<DashboardOptions> DashboardOptionsMonitor => _dashboardOptionsMonitor; 172builder.Services.AddOptions<DashboardOptions>() 175builder.Services.AddSingleton<IPostConfigureOptions<DashboardOptions>, PostConfigureDashboardOptions>(); 176builder.Services.AddSingleton<IValidateOptions<DashboardOptions>, ValidateDashboardOptions>(); 178if (!TryGetDashboardOptions(builder, dashboardConfigSection, out var dashboardOptions, out var failureMessages)) 183_dashboardOptionsMonitor = _app.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>(); 331_dashboardOptionsMonitor = _app.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>(); 400var options = _app.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue; 541/// Load <see cref="DashboardOptions"/> from configuration without using DI. This performs 544private static bool TryGetDashboardOptions(WebApplicationBuilder builder, IConfigurationSection dashboardConfigSection, [NotNullWhen(true)] out DashboardOptions? dashboardOptions, [NotNullWhen(false)] out IEnumerable<string>? failureMessages) 564private void ConfigureKestrelEndpoints(WebApplicationBuilder builder, DashboardOptions dashboardOptions) 699private static void ConfigureAuthentication(WebApplicationBuilder builder, DashboardOptions dashboardOptions) 720var options = context.HttpContext.RequestServices.GetRequiredService<IOptions<DashboardOptions>>().Value; 886static string ConfigureDefaultAuthScheme(DashboardOptions dashboardOptions)
Mcp\AspireResourceMcpTools.cs (2)
22private readonly IOptionsMonitor<DashboardOptions> _dashboardOptions; 26IOptionsMonitor<DashboardOptions> dashboardOptions,
Mcp\AspireTelemetryMcpTools.cs (2)
24private readonly IOptionsMonitor<DashboardOptions> _dashboardOptions; 30IOptionsMonitor<DashboardOptions> dashboardOptions,
Mcp\McpApiKeyAuthenticationHandler.cs (2)
19private readonly IOptionsMonitor<DashboardOptions> _dashboardOptions; 21public McpApiKeyAuthenticationHandler(IOptionsMonitor<DashboardOptions> dashboardOptions, IOptionsMonitor<McpApiKeyAuthenticationHandlerOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Mcp\McpCompositeAuthenticationHandler.cs (2)
14IOptionsMonitor<DashboardOptions> dashboardOptions, 22var options = dashboardOptions.CurrentValue;
Mcp\McpExtensions.cs (1)
12public static IMcpServerBuilder AddAspireMcpTools(this IServiceCollection services, DashboardOptions dashboardOptions)
Model\Assistant\AIContextProvider.cs (2)
19private readonly IOptionsMonitor<DashboardOptions> _dashboardOptions; 30IOptionsMonitor<DashboardOptions> dashboardOptions,
Model\Assistant\AIHelpers.cs (9)
51internal static object GetTraceDto(OtlpTrace trace, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers, PromptContext context, DashboardOptions options, bool includeDashboardUrl = false, Func<OtlpResource, string>? getResourceName = null) 119public static (string json, string limitMessage) GetTracesJson(List<OtlpTrace> traces, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers, DashboardOptions options, bool includeDashboardUrl = false, Func<OtlpResource, string>? getResourceName = null) 133internal static string GetTraceJson(OtlpTrace trace, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers, PromptContext context, DashboardOptions options, bool includeDashboardUrl = false, Func<OtlpResource, string>? getResourceName = null) 161internal static string GetResponseGraphJson(List<ResourceViewModel> resources, DashboardOptions options, bool includeDashboardUrl = false, Func<ResourceViewModel, string>? getResourceName = null, bool includeEnvironmentVariables = false) 264public static object? GetDashboardLink(DashboardOptions options, string path, string text) 279public static string? GetDashboardUrl(DashboardOptions options, string path) 313public static (string json, string limitMessage) GetStructuredLogsJson(List<OtlpLogEntry> errorLogs, DashboardOptions options, bool includeDashboardUrl = false, Func<OtlpResource, string>? getResourceName = null) 327internal static string GetStructuredLogJson(OtlpLogEntry l, DashboardOptions options, bool includeDashboardUrl = false, Func<OtlpResource, string>? getResourceName = null) 335public static object GetLogEntryDto(OtlpLogEntry l, PromptContext context, DashboardOptions options, bool includeDashboardUrl = false, Func<OtlpResource, string>? getResourceName = null)
Model\Assistant\AssistantChatDataContext.cs (2)
24private readonly IOptionsMonitor<DashboardOptions> _dashboardOptions; 38IOptionsMonitor<DashboardOptions> dashboardOptions)
Model\Assistant\AssistantChatViewModel.cs (2)
113private readonly IOptionsMonitor<DashboardOptions> _dashboardOptions; 135IOptionsMonitor<DashboardOptions> dashboardOptions)
Model\Assistant\ChatClientFactory.cs (3)
26private readonly IOptionsMonitor<DashboardOptions> _dashboardOptions; 35private DashboardOptions Options => _dashboardOptions.CurrentValue; 37public ChatClientFactory(IConfiguration configuration, ILoggerFactory loggerFactory, IOptionsMonitor<DashboardOptions> dashboardOptions)
Model\Assistant\IAIContextProvider.cs (1)
43public record InitializePromptContext(ChatViewModelBuilder ChatBuilder, AssistantChatDataContext DataContext, IServiceProvider ServiceProvider, DashboardOptions DashboardOptions);
Model\Assistant\Prompts\KnownChatMessages.cs (6)
45public static ChatMessage CreateInitialMessage(string promptText, string applicationName, List<ResourceViewModel> resources, DashboardOptions dashboardOptions) 179public static ChatMessage CreateErrorStructuredLogsMessage(List<OtlpLogEntry> errorLogs, DashboardOptions options) 197public static ChatMessage CreateAnalyzeLogEntryMessage(OtlpLogEntry logEntry, DashboardOptions options) 283public static ChatMessage CreateAnalyzeTraceMessage(OtlpTrace trace, List<OtlpLogEntry> traceLogEntries, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers, DashboardOptions options) 306public static ChatMessage CreateAnalyzeSpanMessage(OtlpSpan span, List<OtlpLogEntry> traceLogEntries, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers, DashboardOptions options) 329public static ChatMessage CreateErrorTracesMessage(List<OtlpTrace> errorTraces, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers, DashboardOptions options)
Model\ValidateTokenMiddleware.cs (4)
17private readonly IOptionsMonitor<DashboardOptions> _options; 20public ValidateTokenMiddleware(RequestDelegate next, IOptionsMonitor<DashboardOptions> options, ILogger<ValidateTokenMiddleware> logger) 39var dashboardOptions = context.RequestServices.GetRequiredService<IOptionsMonitor<DashboardOptions>>(); 81public static async Task<bool> TryAuthenticateAsync(string incomingBrowserToken, HttpContext httpContext, IOptionsMonitor<DashboardOptions> dashboardOptions)
Otlp\Storage\TelemetryRepository.cs (1)
66public TelemetryRepository(ILoggerFactory loggerFactory, IOptions<DashboardOptions> dashboardOptions, PauseManager pauseManager, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers)
ServiceClient\DashboardClient.cs (2)
58private readonly DashboardOptions _dashboardOptions; 80IOptions<DashboardOptions> dashboardOptions,
Telemetry\DashboardTelemetrySender.cs (2)
16private readonly IOptions<DashboardOptions> _options; 27public DashboardTelemetrySender(IOptions<DashboardOptions> options, ILogger<DashboardTelemetrySender> logger)
Aspire.Dashboard.Components.Tests (6)
Layout\MainLayoutTests.cs (2)
190private void SetupMainLayoutServices(TestLocalStorage? localStorage = null, MessageService? messageService = null, Action<DashboardOptions>? configureOptions = null) 200Services.Configure<DashboardOptions>(o =>
Pages\ConsoleLogsTests.cs (1)
831Services.AddSingleton<IOptions<DashboardOptions>>(Options.Create(new DashboardOptions()));
Pages\StructuredLogsTests.cs (1)
242Services.AddSingleton<IOptions<DashboardOptions>>(Options.Create(new DashboardOptions()));
Pages\TraceDetailsTests.cs (1)
647Services.AddSingleton<IOptions<DashboardOptions>>(Options.Create(new DashboardOptions()));
Shared\MetricsSetupHelpers.cs (1)
90context.Services.AddSingleton<IOptions<DashboardOptions>>(Options.Create(new DashboardOptions()));
Aspire.Dashboard.Tests (44)
DashboardOptionsTests.cs (19)
19private static DashboardOptions GetValidOptions() 51var options = GetValidOptions(); 63var options = GetValidOptions(); 75var options = GetValidOptions(); 89var options = GetValidOptions(); 105var options = GetValidOptions(); 117var options = GetValidOptions(); 131var options = GetValidOptions(); 146var options = GetValidOptions(); 161var options = GetValidOptions(); 175var options = GetValidOptions(); 189var options = GetValidOptions(); 202var options = GetValidOptions(); 219var options = GetValidOptions(); 234var options = GetValidOptions(); 246var options = GetValidOptions(); 264var options = app.Services.GetService<IOptionsMonitor<DashboardOptions>>()!; 276var options = GetValidOptions(); 289var options = GetValidOptions();
Integration\DashboardClientAuthTests.cs (2)
112Action<DashboardOptions>? configureOptions = null) 114var options = new DashboardOptions
Integration\OtlpGrpcServiceTests.cs (2)
199var tcs = new TaskCompletionSource<DashboardOptions>(TaskCreationOptions.RunContinuationsAsynchronously); 222var options = await tcs.Task;
Markdown\MarkdownProcessorTests.cs (1)
375new TestOptionsMonitor<DashboardOptions>(new DashboardOptions()));
Mcp\AspireResourceMcpToolsTests.cs (2)
219var options = new DashboardOptions(); 226new TestOptionsMonitor<DashboardOptions>(options),
Mcp\AspireTelemetryMcpToolsTests.cs (2)
233var options = new DashboardOptions(); 241new TestOptionsMonitor<DashboardOptions>(options),
Middleware\ValidateTokenMiddlewareTests.cs (1)
78services.Configure<DashboardOptions>(o =>
Model\AIAssistant\AIContextProviderTests.cs (1)
123var testOptionsMonitor = new TestOptionsMonitor<DashboardOptions>(new DashboardOptions());
Model\AIAssistant\AIHelpersTests.cs (3)
183var options = new DashboardOptions(); 199var options = new DashboardOptions(); 214var options = new DashboardOptions();
Model\AIAssistant\AssistantChatDataContextTests.cs (1)
135new TestOptionsMonitor<DashboardOptions>(new DashboardOptions()));
Model\DashboardClientTests.cs (2)
20private readonly IOptions<DashboardOptions> _dashboardOptions; 26var options = new DashboardOptions
OtlpApiKeyAuthenticationHandlerTests.cs (2)
78var options = new DashboardOptions 90new TestOptionsMonitor<DashboardOptions>(options),
Telemetry\DashboardTelemetrySenderTests.cs (3)
143public class TestDashboardOptions(DashboardOptions value) : IOptions<DashboardOptions> 145public DashboardOptions Value { get; } = value;
Telemetry\DashboardTelemetryServiceTests.cs (3)
171public class TestDashboardOptions(DashboardOptions value) : IOptions<DashboardOptions> 173public DashboardOptions Value { get; } = value;