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)
1230public T CurrentValue { get; }
Logging\SerialExtendedLoggerTests.cs (1)
98public T CurrentValue { get; }
115 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)
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\Dialogs\AIAgentsDialog.razor.cs (1)
42var options = Options.CurrentValue;
Components\Layout\MainLayout.razor.cs (6)
224return (Options.CurrentValue.Otlp.GetGrpcEndpointAddress() != null || Options.CurrentValue.Otlp.GetHttpEndpointAddress() != null) && 225Options.CurrentValue.Otlp.AuthMode == OtlpAuthMode.Unsecured && 226!Options.CurrentValue.Otlp.SuppressUnsecuredMessage; 232return !Options.CurrentValue.Api.Disabled.GetValueOrDefault() && 233Options.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)
440_dashboardOptionsMonitor.CurrentValue.Otlp.AuthMode == OtlpAuthMode.Unsecured) 445_logger.LogDebug("Dashboard API disabled: {ApiDisabled}", _dashboardOptionsMonitor.CurrentValue.Api.Disabled.GetValueOrDefault()); 449if (!_dashboardOptionsMonitor.CurrentValue.Api.Disabled.GetValueOrDefault() && 450_dashboardOptionsMonitor.CurrentValue.Api.AuthMode == ApiAuthMode.Unsecured) 583var 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 (20)
DashboardOptionsTests.cs (1)
312Assert.True(options.CurrentValue.Otlp.SuppressUnsecuredMessage);
Integration\StartupTests.cs (18)
347Assert.Equal(OtlpAuthMode.ApiKey, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 348Assert.Equal("TestKey123!", app.DashboardOptionsMonitor.CurrentValue.Otlp.PrimaryApiKey); 371Assert.Equal(8080, app.DashboardOptionsMonitor.CurrentValue.DebugSession.Port); 373var cert = app.DashboardOptionsMonitor.CurrentValue.DebugSession.GetServerCertificate(); 377Assert.Equal("token!", app.DashboardOptionsMonitor.CurrentValue.DebugSession.Token); 378Assert.Equal("aspire-extension-run-123-dashboard", app.DashboardOptionsMonitor.CurrentValue.DebugSession.DcpInstanceId); 379Assert.Equal(true, app.DashboardOptionsMonitor.CurrentValue.DebugSession.TelemetryOptOut); 559Assert.Equal(FrontendAuthMode.BrowserToken, app.DashboardOptionsMonitor.CurrentValue.Frontend.AuthMode); 560Assert.Equal(16, Convert.FromHexString(app.DashboardOptionsMonitor.CurrentValue.Frontend.BrowserToken!).Length); 561Assert.Equal(OtlpAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 562Assert.Equal(ApiAuthMode.ApiKey, app.DashboardOptionsMonitor.CurrentValue.Api.AuthMode); 563Assert.False(string.IsNullOrEmpty(app.DashboardOptionsMonitor.CurrentValue.Api.PrimaryApiKey), "A primary API key should be auto-generated."); 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); 1046Assert.Equal(value, app.DashboardOptionsMonitor.CurrentValue.UI.DisableResourceGraph);
Integration\TelemetryApiTests.cs (1)
42var 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.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 (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 (9)
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);