8 implementations of CurrentValue
Aspire.Dashboard.Tests (2)
Model\TestOptionsMonitor.cs (1)
15public T CurrentValue { get; }
OtlpApiKeyAuthenticationHandlerTests.cs (1)
108public T CurrentValue { get; }
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (1)
StaticOptionsMonitor.cs (1)
16public T CurrentValue { get; }
Microsoft.Extensions.Logging (1)
StaticFilterOptionsMonitor.cs (1)
20public LoggerFilterOptions CurrentValue { get; }
Microsoft.Extensions.Logging.Console (1)
FormatterOptionsMonitor.cs (1)
28public TOptions CurrentValue => _options;
Microsoft.Extensions.Options (1)
OptionsMonitor.cs (1)
77public TOptions CurrentValue
Microsoft.Extensions.Telemetry.Tests (2)
Logging\ExtendedLoggerTests.cs (1)
1225public T CurrentValue { get; }
Logging\SerialExtendedLoggerTests.cs (1)
98public T CurrentValue { get; }
143 references to CurrentValue
Aspire.Dashboard (46)
Api\ApiAuthenticationHandler.cs (2)
36var currentOptions = dashboardOptions.CurrentValue; 119var frontendAuthMode = dashboardOptions.CurrentValue.Frontend.AuthMode;
Authentication\FrontendCompositeAuthenticationHandler.cs (1)
46return dashboardOptions.CurrentValue.Frontend.AuthMode switch
Authentication\OtlpApiKey\OtlpApiKeyAuthenticationHandler.cs (1)
24var options = _dashboardOptions.CurrentValue.Otlp;
Authentication\OtlpCompositeAuthenticationHandler.cs (1)
24var options = dashboardOptions.CurrentValue;
Components\Controls\UserProfile.razor.cs (3)
42if (DashboardOptions.CurrentValue.Frontend.AuthMode == FrontendAuthMode.OpenIdConnect) 51_name = claimsIdentity.FindFirst(DashboardOptions.CurrentValue.Frontend.OpenIdConnect.GetNameClaimTypes()); 58_username = claimsIdentity.FindFirst(DashboardOptions.CurrentValue.Frontend.OpenIdConnect.GetUsernameClaimTypes());
Components\Layout\MainLayout.razor.cs (10)
186return (Options.CurrentValue.Otlp.GetGrpcEndpointAddress() != null || Options.CurrentValue.Otlp.GetHttpEndpointAddress() != null) && 187Options.CurrentValue.Otlp.AuthMode == OtlpAuthMode.Unsecured && 188!Options.CurrentValue.Otlp.SuppressUnsecuredMessage; 194return Options.CurrentValue.Mcp.GetEndpointAddress() != null && 195!Options.CurrentValue.Mcp.Disabled.GetValueOrDefault() && 196Options.CurrentValue.Mcp.AuthMode == McpAuthMode.Unsecured && 197!Options.CurrentValue.Mcp.SuppressUnsecuredMessage; 203return Options.CurrentValue.Api.Enabled.GetValueOrDefault() && 204Options.CurrentValue.Api.AuthMode == ApiAuthMode.Unsecured;
Components\Pages\Resources.razor.cs (1)
242_hideResourceGraph = DashboardOptions.CurrentValue.UI.DisableResourceGraph ?? false;
DashboardWebApplication.cs (6)
401_dashboardOptionsMonitor.CurrentValue.Otlp.AuthMode == OtlpAuthMode.Unsecured) 408!_dashboardOptionsMonitor.CurrentValue.Mcp.Disabled.GetValueOrDefault() && 409_dashboardOptionsMonitor.CurrentValue.Mcp.AuthMode == McpAuthMode.Unsecured) 416if (_dashboardOptionsMonitor.CurrentValue.Api.Enabled.GetValueOrDefault() && 417_dashboardOptionsMonitor.CurrentValue.Api.AuthMode == ApiAuthMode.Unsecured) 425var options = _app.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue;
Mcp\AspireResourceMcpTools.cs (1)
46_dashboardOptions.CurrentValue,
Mcp\AspireTelemetryMcpTools.cs (3)
78_dashboardOptions.CurrentValue, 130AIHelpers.GetDashboardUrl(_dashboardOptions.CurrentValue)); 171_dashboardOptions.CurrentValue,
Mcp\McpApiKeyAuthenticationHandler.cs (1)
33var options = _dashboardOptions.CurrentValue.Mcp;
Mcp\McpCompositeAuthenticationHandler.cs (1)
22var options = dashboardOptions.CurrentValue;
Model\Assistant\AIContextProvider.cs (2)
189await sendInitialPrompt(new InitializePromptContext(chatBuilder, viewModel.DataContext, _serviceProvider, _dashboardOptions.CurrentValue)).ConfigureAwait(false); 282if (_dashboardOptions.CurrentValue.AI.Disabled.GetValueOrDefault())
Model\Assistant\AssistantChatDataContext.cs (5)
68var resourceGraphData = AIHelpers.GetResponseGraphJson(resources.ToList(), _dashboardOptions.CurrentValue); 102return SharedAIHelpers.GetTraceJson(spans, r => OtlpHelpers.GetResourceName(r, resources), AIHelpers.GetDashboardUrl(_dashboardOptions.CurrentValue)); 136var (logsData, limitMessage) = AIHelpers.GetStructuredLogsJson(otlpData, _dashboardOptions.CurrentValue, r => OtlpHelpers.GetResourceName(r, resources)); 180var (tracesData, limitMessage) = SharedAIHelpers.GetTracesJson(spans, r => OtlpHelpers.GetResourceName(r, resources), AIHelpers.GetDashboardUrl(_dashboardOptions.CurrentValue)); 219var (logsData, limitMessage) = AIHelpers.GetStructuredLogsJson(otlpData, _dashboardOptions.CurrentValue, r => OtlpHelpers.GetResourceName(r, resources));
Model\Assistant\AssistantChatViewModel.cs (2)
880chatViewModel.AddChatMessage(() => KnownChatMessages.General.CreateInitialMessage(promptText, _dataContext.ApplicationName, _dataContext.GetResources().ToList(), _dashboardOptions.CurrentValue)); 952await item.CreatePrompt(new InitializePromptContext(chatBuilder, _dataContext, _serviceProvider, _dashboardOptions.CurrentValue)).ConfigureAwait(false);
Model\Assistant\ChatClientFactory.cs (2)
35private DashboardOptions Options => _dashboardOptions.CurrentValue; 184if (!DebugSessionHelpers.HasDebugSession(_dashboardOptions.CurrentValue.DebugSession, out _, out _, out _))
Model\TelemetryImportService.cs (1)
27public bool IsImportEnabled => _options.CurrentValue.UI.DisableImport != true;
Model\ValidateTokenMiddleware.cs (3)
31if (_options.CurrentValue.Frontend.AuthMode != FrontendAuthMode.BrowserToken) 37else if (context.Request.Query.TryGetValue("t", out var value) && _options.CurrentValue.Frontend.AuthMode == FrontendAuthMode.BrowserToken) 83if (string.IsNullOrEmpty(incomingBrowserToken) || dashboardOptions.CurrentValue.Frontend.GetBrowserTokenBytes() is not { } expectedBrowserTokenBytes)
Aspire.Dashboard.Tests (20)
DashboardOptionsTests.cs (1)
265Assert.True(options.CurrentValue.Otlp.SuppressUnsecuredMessage);
Integration\StartupTests.cs (16)
269Assert.Equal(OtlpAuthMode.ApiKey, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 270Assert.Equal("TestKey123!", app.DashboardOptionsMonitor.CurrentValue.Otlp.PrimaryApiKey); 294Assert.Equal(8080, app.DashboardOptionsMonitor.CurrentValue.DebugSession.Port); 296var cert = app.DashboardOptionsMonitor.CurrentValue.DebugSession.GetServerCertificate(); 300Assert.Equal("token!", app.DashboardOptionsMonitor.CurrentValue.DebugSession.Token); 301Assert.Equal(true, app.DashboardOptionsMonitor.CurrentValue.DebugSession.TelemetryOptOut); 561Assert.Equal(FrontendAuthMode.BrowserToken, app.DashboardOptionsMonitor.CurrentValue.Frontend.AuthMode); 562Assert.Equal(16, Convert.FromHexString(app.DashboardOptionsMonitor.CurrentValue.Frontend.BrowserToken!).Length); 563Assert.Equal(OtlpAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 581Assert.Equal(FrontendAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Frontend.AuthMode); 582Assert.Equal(OtlpAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 599Assert.Equal(ResourceClientAuthMode.Certificate, app.DashboardOptionsMonitor.CurrentValue.ResourceServiceClient.AuthMode); 600Assert.Equal(DashboardClientCertificateSource.KeyStore, app.DashboardOptionsMonitor.CurrentValue.ResourceServiceClient.ClientCertificate.Source); 601Assert.Equal("MySubject", app.DashboardOptionsMonitor.CurrentValue.ResourceServiceClient.ClientCertificate.Subject); 1086Assert.Equal(value, app.DashboardOptionsMonitor.CurrentValue.UI.DisableResourceGraph); 1127Assert.Equal(value, app.DashboardOptionsMonitor.CurrentValue.AI.Disabled);
Integration\TelemetryApiTests.cs (3)
40var options = app.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue; 59var options = app.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue; 80var options = app.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue;
Aspire.Hosting (1)
Dashboard\DashboardServiceAuth.cs (1)
37var options = resourceServiceOptions.CurrentValue;
AzureKusto.Worker (5)
IngestionWorker.cs (3)
40_workerOptions.CurrentValue.IsIngestionComplete = true; 55DatabaseName = _workerOptions.CurrentValue.DatabaseName, 56TableName = _workerOptions.CurrentValue.TableName,
QueryWorker.cs (2)
32while (!stoppingToken.IsCancellationRequested && !_workerOptions.CurrentValue.IsIngestionComplete) 40return await _queryClient.ExecuteQueryAsync(_queryClient.DefaultDatabaseName, _workerOptions.CurrentValue.TableName, new ClientRequestProperties(), ct);
Microsoft.Arcade.Common (1)
CompactConsoleLoggerFormatter.cs (1)
45_options = options.CurrentValue;
Microsoft.AspNetCore.Diagnostics.Middleware (4)
Buffering\IncomingRequestLogBuffer.cs (4)
46_filterRules = LogBufferingFilterRuleSelector.SelectByCategory(_options.CurrentValue.Rules.ToArray(), category); 51if (_timeProvider.GetUtcNow() < _lastFlushTimestamp + _options.CurrentValue.AutoFlushDuration) 81if (serializedLogRecord.SizeInBytes > _options.CurrentValue.MaxLogRecordSizeInBytes) 156while (_activeBufferSize > _options.CurrentValue.MaxPerRequestBufferSizeInBytes &&
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (6)
Buffering\PerIncomingRequestLoggingBuilderExtensionsTests.cs (6)
68Assert.NotNull(options.CurrentValue); 69Assert.Equivalent(expectedData, options.CurrentValue.Rules); 90Assert.NotNull(options.CurrentValue); 91Assert.Equivalent(expectedData, options.CurrentValue.Rules); 137Assert.NotNull(options.CurrentValue); 138Assert.Equivalent(initialData, options.CurrentValue.Rules);
Microsoft.AspNetCore.HostFiltering (1)
MiddlewareConfigurationManager.cs (1)
23_middlewareConfiguration = ConfigureMiddleware(_optionsMonitor.CurrentValue);
Microsoft.AspNetCore.Http (1)
Timeouts\RequestTimeoutsMiddleware.cs (1)
40var options = _options.CurrentValue;
Microsoft.AspNetCore.HttpLogging (7)
FileLoggerProcessor.cs (1)
45var loggerOptions = _options.CurrentValue;
HttpLoggingMiddleware.cs (1)
61var options = _options.CurrentValue;
W3CLogger.cs (1)
20_loggingFields = _options.CurrentValue.LoggingFields;
W3CLoggerProcessor.cs (2)
21_loggingFields = options.CurrentValue.LoggingFields; 22_additionalRequestHeaders = W3CLoggerOptions.FilterRequestHeaders(options.CurrentValue);
W3CLoggingMiddleware.cs (2)
62_additionalRequestHeaders = W3CLoggerOptions.FilterRequestHeaders(options.CurrentValue); 72var options = _options.CurrentValue;
Microsoft.Extensions.Diagnostics (1)
Metrics\MetricsSubscriptionManager.cs (1)
27UpdateRules(options.CurrentValue);
Microsoft.Extensions.Http.Diagnostics (1)
Logging\Internal\OptionsExtensions.cs (1)
24return optionsMonitor.CurrentValue;
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\Internal\HelperExtensions.cs (1)
39.SetupGet(monitor => monitor.CurrentValue)
Microsoft.Extensions.Logging (1)
LoggerFactory.cs (1)
104RefreshFilters(filterOption.CurrentValue);
Microsoft.Extensions.Logging.Console (12)
ConsoleLoggerProvider.cs (9)
61options.CurrentValue.QueueFullMode, 62options.CurrentValue.MaxQueueLength); 64ReloadLoggerOptions(options.CurrentValue); 153if (_options.CurrentValue.FormatterName == null || !_formatters.TryGetValue(_options.CurrentValue.FormatterName, out ConsoleFormatter? logFormatter)) 156logFormatter = _options.CurrentValue.Format switch 163if (_options.CurrentValue.FormatterName == null) 165UpdateFormatterOptions(logFormatter, _options.CurrentValue); 171_loggers.GetOrAdd(name, new ConsoleLogger(name, _messageQueue, logFormatter, _scopeProvider, _options.CurrentValue));
JsonConsoleFormatter.cs (1)
24ReloadLoggerOptions(options.CurrentValue);
SimpleConsoleFormatter.cs (1)
30ReloadLoggerOptions(options.CurrentValue);
SystemdConsoleFormatter.cs (1)
20ReloadLoggerOptions(options.CurrentValue);
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (1)
DependencyInjectionExtensionsTests.cs (1)
71Assert.Equal(DependencyInjectionPoolOptions.DefaultCapacity, options.CurrentValue.Capacity);
Microsoft.Extensions.ServiceDiscovery.Dns (13)
DnsServiceEndpointProvider.cs (5)
19protected override double RetryBackOffFactor => options.CurrentValue.RetryBackOffFactor; 20protected override TimeSpan MinRetryPeriod => options.CurrentValue.MinRetryPeriod; 21protected override TimeSpan MaxRetryPeriod => options.CurrentValue.MaxRetryPeriod; 22protected override TimeSpan DefaultRefreshPeriod => options.CurrentValue.DefaultRefreshPeriod; 61if (options.CurrentValue.ShouldApplyHostNameMetadata(serviceEndpoint))
DnsSrvServiceEndpointProvider.cs (5)
20protected override double RetryBackOffFactor => options.CurrentValue.RetryBackOffFactor; 22protected override TimeSpan MinRetryPeriod => options.CurrentValue.MinRetryPeriod; 24protected override TimeSpan MaxRetryPeriod => options.CurrentValue.MaxRetryPeriod; 26protected override TimeSpan DefaultRefreshPeriod => options.CurrentValue.DefaultRefreshPeriod; 71if (options.CurrentValue.ShouldApplyHostNameMetadata(serviceEndpoint))
DnsSrvServiceEndpointProviderFactory.cs (2)
20private readonly string? _querySuffix = options.CurrentValue.QuerySuffix?.TrimStart('.') ?? GetKubernetesHostDomain(); 25var optionsValue = options.CurrentValue;
FallbackDnsResolver.cs (1)
24private TimeSpan DefaultRefreshPeriod => _options.CurrentValue.DefaultRefreshPeriod;
Microsoft.Extensions.Telemetry (4)
Logging\ExtendedLoggerFactory.cs (3)
80RefreshFilters(filterOptions.CurrentValue); 109Config = ComputeConfig(enrichmentOptions?.CurrentValue ?? new(), redactionOptions?.CurrentValue ?? new() { ApplyDiscriminator = false });
Sampling\RandomProbabilisticSampler.cs (1)
41LastKnownGoodSamplerRules = Throw.IfNullOrMemberNull(options, options.CurrentValue).Rules.ToArray();
Microsoft.Extensions.Telemetry.Tests (16)
Buffering\GlobalBufferLoggerBuilderExtensionsTests.cs (7)
66Assert.NotNull(options.CurrentValue); 67Assert.Equal(33, options.CurrentValue.MaxLogRecordSizeInBytes); // value comes from the Configure<GlobalLogBufferingOptions>() call 68Assert.Equal(1000, options.CurrentValue.MaxBufferSizeInBytes); // value comes from appsettings.json 69Assert.Equal(TimeSpan.FromSeconds(30), options.CurrentValue.AutoFlushDuration); // value comes from default 70Assert.Equivalent(expectedData, options.CurrentValue.Rules); 119Assert.NotNull(options.CurrentValue); 120Assert.Equivalent(initialData, options.CurrentValue.Rules);
Sampling\SamplingLoggerBuilderExtensionsTests.cs (9)
72Assert.NotNull(options.CurrentValue); 73Assert.Equivalent(expectedData, options.CurrentValue.Rules); 125Assert.NotNull(options.CurrentValue); 126Assert.Equivalent(initialData, options.CurrentValue.Rules); 166Assert.Throws<OptionsValidationException>(() => options?.CurrentValue.Rules); 183Assert.Throws<OptionsValidationException>(() => options?.CurrentValue.Rules); 206Assert.Throws<OptionsValidationException>(() => options?.CurrentValue.Rules); 229Assert.NotNull(options.CurrentValue); 230Assert.Equivalent(expectedData, options.CurrentValue.Rules);
Microsoft.TemplateEngine.Cli (1)
CliConsoleFormatter.cs (1)
19(options.OnChange(ReloadLoggerOptions), options.CurrentValue);