9 implementations of CurrentValue
Aspire.Dashboard.Tests (2)
Model\TestOptionsMonitor.cs (1)
15public T CurrentValue { get; }
OtlpApiKeyAuthenticationHandlerTests.cs (1)
122public 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)
1230public T CurrentValue { get; }
Logging\SerialExtendedLoggerTests.cs (1)
98public T CurrentValue { get; }
Microsoft.TemplateEngine.Cli (1)
CliTemplateEngineHost.cs (1)
63public TOptions CurrentValue => options;
133 references to CurrentValue
Aspire.Dashboard (25)
Api\ApiAuthenticationHandler.cs (1)
33var currentOptions = dashboardOptions.CurrentValue;
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)
45if (DashboardOptions.CurrentValue.Frontend.AuthMode == FrontendAuthMode.OpenIdConnect) 54_name = claimsIdentity.FindFirst(DashboardOptions.CurrentValue.Frontend.OpenIdConnect.GetNameClaimTypes()); 61_username = claimsIdentity.FindFirst(DashboardOptions.CurrentValue.Frontend.OpenIdConnect.GetUsernameClaimTypes());
Components\Dialogs\AIAgentsDialog.razor.cs (1)
41var options = Options.CurrentValue;
Components\Layout\MainLayout.razor.cs (6)
228return (Options.CurrentValue.Otlp.GetGrpcEndpointAddress() != null || Options.CurrentValue.Otlp.GetHttpEndpointAddress() != null) && 229Options.CurrentValue.Otlp.AuthMode == OtlpAuthMode.Unsecured && 230!Options.CurrentValue.Otlp.SuppressUnsecuredMessage; 236return !Options.CurrentValue.Api.Disabled.GetValueOrDefault() && 237Options.CurrentValue.Api.AuthMode == ApiAuthMode.Unsecured;
Components\Pages\Resources.razor.cs (1)
208_hideResourceGraph = DashboardOptions.CurrentValue.UI.DisableResourceGraph ?? false;
DashboardEndpointsBuilder.cs (1)
114var currentOptions = optionsMonitor.CurrentValue;
DashboardWebApplication.cs (5)
496_dashboardOptionsMonitor.CurrentValue.Otlp.AuthMode == OtlpAuthMode.Unsecured) 501_logger.LogDebug("Dashboard API disabled: {ApiDisabled}", _dashboardOptionsMonitor.CurrentValue.Api.Disabled.GetValueOrDefault()); 505if (!_dashboardOptionsMonitor.CurrentValue.Api.Disabled.GetValueOrDefault() && 506_dashboardOptionsMonitor.CurrentValue.Api.AuthMode == ApiAuthMode.Unsecured) 629var options = _app.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue;
Model\TelemetryImportService.cs (1)
29public 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) 86if (string.IsNullOrEmpty(incomingBrowserToken) || dashboardOptions.CurrentValue.Frontend.GetBrowserTokenBytes() is not { } expectedBrowserTokenBytes)
Aspire.Dashboard.Tests (17)
DashboardOptionsTests.cs (1)
385Assert.True(options.CurrentValue.Otlp.SuppressUnsecuredMessage);
Integration\OtlpHttpServiceTests.cs (2)
167var exception = Assert.Throws<OptionsValidationException>(() => _ = app.DashboardOptionsMonitor.CurrentValue); 172var options = app.DashboardOptionsMonitor.CurrentValue.Otlp;
Integration\StartupTests.cs (13)
362Assert.Equal(OtlpAuthMode.ApiKey, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 363Assert.Equal("TestKey123!", app.DashboardOptionsMonitor.CurrentValue.Otlp.PrimaryApiKey); 563Assert.Equal(FrontendAuthMode.BrowserToken, app.DashboardOptionsMonitor.CurrentValue.Frontend.AuthMode); 564Assert.Equal(16, Convert.FromHexString(app.DashboardOptionsMonitor.CurrentValue.Frontend.BrowserToken!).Length); 565Assert.Equal(OtlpAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 566Assert.Equal(ApiAuthMode.ApiKey, app.DashboardOptionsMonitor.CurrentValue.Api.AuthMode); 567Assert.False(string.IsNullOrEmpty(app.DashboardOptionsMonitor.CurrentValue.Api.PrimaryApiKey), "A primary API key should be auto-generated."); 585Assert.Equal(FrontendAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Frontend.AuthMode); 586Assert.Equal(OtlpAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 603Assert.Equal(ResourceClientAuthMode.Certificate, app.DashboardOptionsMonitor.CurrentValue.ResourceServiceClient.AuthMode); 604Assert.Equal(DashboardClientCertificateSource.KeyStore, app.DashboardOptionsMonitor.CurrentValue.ResourceServiceClient.ClientCertificate.Source); 605Assert.Equal("MySubject", app.DashboardOptionsMonitor.CurrentValue.ResourceServiceClient.ClientCertificate.Subject); 1050Assert.Equal(value, app.DashboardOptionsMonitor.CurrentValue.UI.DisableResourceGraph);
Integration\TelemetryApiTests.cs (1)
41var 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 (5)
Buffering\IncomingRequestLogBuffer.cs (5)
46_filterRules = LogBufferingFilterRuleSelector.SelectByCategory(_options.CurrentValue.Rules.ToArray(), category); 51if (_timeProvider.GetUtcNow() < _lastFlushTimestamp + _options.CurrentValue.AutoFlushDuration) 80_options.CurrentValue.IncludeScopes ? _scopeProvider : null); 82if (serializedLogRecord.SizeInBytes > _options.CurrentValue.MaxLogRecordSizeInBytes) 145while (_activeBufferSize > _options.CurrentValue.MaxPerRequestBufferSizeInBytes &&
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (8)
Buffering\PerIncomingRequestLoggingBuilderExtensionsTests.cs (8)
68Assert.NotNull(options.CurrentValue); 69Assert.Equivalent(expectedData, options.CurrentValue.Rules); 90Assert.NotNull(options.CurrentValue); 91Assert.Equivalent(expectedData, options.CurrentValue.Rules); 101Assert.True(serviceProvider.GetRequiredService<IOptionsMonitor<GlobalLogBufferingOptions>>().CurrentValue.IncludeScopes); 147Assert.NotNull(options.CurrentValue); 148Assert.Equivalent(initialData, options.CurrentValue.Rules); 166Assert.Equivalent(updatedData, bufferManager.Options.CurrentValue.Rules, strict: true);
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 (2)
Metrics\MetricsSubscriptionManager.cs (1)
27UpdateRules(options.CurrentValue);
Tracing\DefaultActivitySourceFactory.cs (1)
39UpdateRules(options.CurrentValue, false);
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.AzureAppServices (5)
BatchingLoggerProvider.cs (2)
39var loggerOptions = options.CurrentValue; 58UpdateOptions(options.CurrentValue);
BlobLoggerProvider.cs (2)
35options.CurrentValue.ContainerUrl, 58var options = _options.CurrentValue;
FileLoggerProvider.cs (1)
32var loggerOptions = options.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 (9)
Buffering\GlobalBuffer.cs (5)
55LastKnownGoodFilterRules = LogBufferingFilterRuleSelector.SelectByCategory(_options.CurrentValue.Rules.ToArray(), _category); 73if (_timeProvider.GetUtcNow() < _lastFlushTimestamp + _options.CurrentValue.AutoFlushDuration) 102_options.CurrentValue.IncludeScopes ? _scopeProvider : null); 104if (serializedLogRecord.SizeInBytes > _options.CurrentValue.MaxLogRecordSizeInBytes) 178while (_activeBufferSize > _options.CurrentValue.MaxBufferSizeInBytes &&
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);