12 implementations of CurrentValue
Aspire.Dashboard.Tests (2)
Model\TestOptionsMonitor.cs (1)
15public T CurrentValue { get; }
OtlpApiKeyAuthenticationHandlerTests.cs (1)
108public T CurrentValue { get; }
Microsoft.AspNetCore.HostFiltering.Tests (1)
MiddlewareConfigurationManagerTests.cs (1)
113public T CurrentValue { get; }
Microsoft.AspNetCore.Http.Microbenchmarks (1)
RequestTimeoutsMiddlewareBenchmark.cs (1)
140public RequestTimeoutOptions CurrentValue => _options;
Microsoft.AspNetCore.Http.Tests (1)
Timeouts\RequestTimeoutsMiddlewareTests.cs (1)
387public RequestTimeoutOptions CurrentValue => _options;
Microsoft.AspNetCore.HttpLogging.Tests (1)
OptionsWrapperMonitor.cs (1)
25public 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; }
240 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 (9)
179return (Options.CurrentValue.Otlp.GetGrpcEndpointAddress() != null || Options.CurrentValue.Otlp.GetHttpEndpointAddress() != null) && 180Options.CurrentValue.Otlp.AuthMode == OtlpAuthMode.Unsecured && 181!Options.CurrentValue.Otlp.SuppressUnsecuredMessage; 187return Options.CurrentValue.Mcp.GetEndpointAddress() != null && 188Options.CurrentValue.Mcp.AuthMode == McpAuthMode.Unsecured && 189!Options.CurrentValue.Mcp.SuppressUnsecuredMessage; 195return Options.CurrentValue.Api.Enabled == true && 196Options.CurrentValue.Api.AuthMode == ApiAuthMode.Unsecured;
Components\Pages\Resources.razor.cs (1)
242_hideResourceGraph = DashboardOptions.CurrentValue.UI.DisableResourceGraph ?? false;
Components_Layout_MainLayout_razor.g.cs (2)
575if (Options.CurrentValue.Mcp.GetEndpointAddress() != null && !Options.CurrentValue.Mcp.Disabled.GetValueOrDefault())
DashboardWebApplication.cs (5)
401_dashboardOptionsMonitor.CurrentValue.Otlp.AuthMode == OtlpAuthMode.Unsecured) 408_dashboardOptionsMonitor.CurrentValue.Mcp.AuthMode == McpAuthMode.Unsecured) 415if (_dashboardOptionsMonitor.CurrentValue.Api.Enabled == true && 416_dashboardOptionsMonitor.CurrentValue.Api.AuthMode == ApiAuthMode.Unsecured) 424var options = _app.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue;
Mcp\AspireResourceMcpTools.cs (1)
46_dashboardOptions.CurrentValue,
Mcp\AspireTelemetryMcpTools.cs (3)
77_dashboardOptions.CurrentValue, 129_dashboardOptions.CurrentValue, 172_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); 99return AIHelpers.GetTraceJson(trace, _outgoingPeerResolvers, new PromptContext(), _dashboardOptions.CurrentValue); 131var (logsData, limitMessage) = AIHelpers.GetStructuredLogsJson(logs.Items, _dashboardOptions.CurrentValue); 173var (tracesData, limitMessage) = AIHelpers.GetTracesJson(traces.PagedResult.Items, _outgoingPeerResolvers, _dashboardOptions.CurrentValue); 210var (logsData, limitMessage) = AIHelpers.GetStructuredLogsJson(logs.Items, _dashboardOptions.CurrentValue);
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); 560Assert.Equal(FrontendAuthMode.BrowserToken, app.DashboardOptionsMonitor.CurrentValue.Frontend.AuthMode); 561Assert.Equal(16, Convert.FromHexString(app.DashboardOptionsMonitor.CurrentValue.Frontend.BrowserToken!).Length); 562Assert.Equal(OtlpAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 580Assert.Equal(FrontendAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Frontend.AuthMode); 581Assert.Equal(OtlpAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 598Assert.Equal(ResourceClientAuthMode.Certificate, app.DashboardOptionsMonitor.CurrentValue.ResourceServiceClient.AuthMode); 599Assert.Equal(DashboardClientCertificateSource.KeyStore, app.DashboardOptionsMonitor.CurrentValue.ResourceServiceClient.ClientCertificate.Source); 600Assert.Equal("MySubject", app.DashboardOptionsMonitor.CurrentValue.ResourceServiceClient.ClientCertificate.Subject); 1001Assert.Equal(value, app.DashboardOptionsMonitor.CurrentValue.UI.DisableResourceGraph); 1042Assert.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.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.AspNetCore.HttpLogging.Tests (91)
HttpLoggingMiddlewareTests.cs (71)
121options.CurrentValue.LoggingFields = HttpLoggingFields.None; 165options.CurrentValue.LoggingFields = HttpLoggingFields.Request; 197options.CurrentValue.LoggingFields = HttpLoggingFields.RequestProperties; 229options.CurrentValue.LoggingFields = HttpLoggingFields.RequestHeaders; 288options.CurrentValue.RequestHeaders.Clear(); 289options.CurrentValue.RequestHeaders.Add("foo"); 310options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 328options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 359options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 387options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 415options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 455options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 456options.CurrentValue.RequestBodyLogLimit = 4; 482var expected = input.Substring(0, options.CurrentValue.RequestBodyLogLimit / 3) + "[Truncated by RequestBodyLogLimit]"; 492options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 518var expected = input.Substring(0, options.CurrentValue.RequestBodyLogLimit) + "[Truncated by RequestBodyLogLimit]"; 528options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 553options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 586options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 621options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 659options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 660options.CurrentValue.MediaTypeOptions.Clear(); 661options.CurrentValue.MediaTypeOptions.AddText("text/plain", encoding); 697options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 698options.CurrentValue.MediaTypeOptions.Clear(); 699options.CurrentValue.MediaTypeOptions.AddText("text/plain", encoding); 736options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 737options.CurrentValue.MediaTypeOptions.Clear(); 738options.CurrentValue.MediaTypeOptions.AddText("text/plain", encoding); 772options.CurrentValue.LoggingFields = HttpLoggingFields.All; 790options.CurrentValue.LoggingFields = HttpLoggingFields.None; 817options.CurrentValue.LoggingFields = HttpLoggingFields.All; 845options.CurrentValue.LoggingFields = HttpLoggingFields.All; 894options.CurrentValue.LoggingFields = HttpLoggingFields.Response; 918options.CurrentValue.LoggingFields = HttpLoggingFields.Duration; 940options.CurrentValue.LoggingFields = HttpLoggingFields.Response; 964options.CurrentValue.LoggingFields = HttpLoggingFields.Response; 990options.CurrentValue.LoggingFields = HttpLoggingFields.ResponseStatusCode; 1014options.CurrentValue.LoggingFields = HttpLoggingFields.ResponseHeaders; 1038options.CurrentValue.LoggingFields = HttpLoggingFields.ResponseHeaders; 1058options.CurrentValue.LoggingFields = HttpLoggingFields.ResponseHeaders; 1059options.CurrentValue.ResponseHeaders.Clear(); 1060options.CurrentValue.ResponseHeaders.Add("Test"); 1083options.CurrentValue.LoggingFields = HttpLoggingFields.ResponseBody; 1103options.CurrentValue.LoggingFields = HttpLoggingFields.ResponseBody; 1124options.CurrentValue.LoggingFields = HttpLoggingFields.ResponseBody; 1137var expected = input.Substring(0, options.CurrentValue.ResponseBodyLogLimit); 1145options.CurrentValue.LoggingFields = HttpLoggingFields.Response; 1183options.CurrentValue.LoggingFields = HttpLoggingFields.Response; 1220options.CurrentValue.LoggingFields = HttpLoggingFields.ResponseBody; 1246options.CurrentValue.LoggingFields = HttpLoggingFields.ResponseBody; 1266options.CurrentValue.LoggingFields = HttpLoggingFields.RequestBody; 1281options.CurrentValue.LoggingFields = HttpLoggingFields.ResponseStatusCode; 1324options.CurrentValue.LoggingFields = HttpLoggingFields.All; 1325options.CurrentValue.CombineLogs = true; 1385options.CurrentValue.LoggingFields = HttpLoggingFields.ResponseHeaders; 1428options.CurrentValue.LoggingFields = HttpLoggingFields.All ^ HttpLoggingFields.ResponsePropertiesAndHeaders; 1474options.CurrentValue.LoggingFields = HttpLoggingFields.ResponsePropertiesAndHeaders; 1509options.CurrentValue.LoggingFields = loggingFields; 1546options.CurrentValue.LoggingFields = loggingFields; 1587options.CurrentValue.LoggingFields = fields; 1588options.CurrentValue.CombineLogs = true; 1656options.CurrentValue.LoggingFields = HttpLoggingFields.All; 1657options.CurrentValue.CombineLogs = true; 1699options.CurrentValue.LoggingFields = fields; 1700options.CurrentValue.CombineLogs = true; 1762options.CurrentValue.LoggingFields = HttpLoggingFields.All; 1790options.CurrentValue.LoggingFields = HttpLoggingFields.None; 1818options.CurrentValue.LoggingFields = HttpLoggingFields.All; 1846options.CurrentValue.LoggingFields = HttpLoggingFields.All; 2120var optionsAccessor = Mock.Of<IOptionsMonitor<HttpLoggingOptions>>(o => o.CurrentValue == options);
W3CLoggingMiddlewareTests.cs (20)
42options.CurrentValue.LoggingFields = W3CLoggingFields.None; 108options.CurrentValue.AdditionalRequestHeaders.Add("x-forwarded-for"); 109options.CurrentValue.AdditionalRequestHeaders.Add("x-client-ssl-protocol"); 110options.CurrentValue.AdditionalRequestHeaders.Add(":invalid"); 123options.CurrentValue.AdditionalRequestHeaders.Add("ignored-header-added-after-clone"); 154options.CurrentValue.LoggingFields = W3CLoggingFields.Cookie; 184options.CurrentValue.AdditionalRequestHeaders.Add("x-forwarded-for"); 185options.CurrentValue.LoggingFields = W3CLoggingFields.None; 220options.CurrentValue.LoggingFields = options.CurrentValue.LoggingFields | W3CLoggingFields.Host | 224options.CurrentValue.AdditionalRequestHeaders.Add(":invalid"); 225options.CurrentValue.AdditionalRequestHeaders.Add("x-forwarded-for"); 226options.CurrentValue.AdditionalRequestHeaders.Add("Host"); 227options.CurrentValue.AdditionalRequestHeaders.Add("Referer"); 228options.CurrentValue.AdditionalRequestHeaders.Add("User-Agent"); 229options.CurrentValue.AdditionalRequestHeaders.Add("Cookie"); 230options.CurrentValue.AdditionalRequestHeaders.Add("x-client-ssl-protocol"); 243options.CurrentValue.AdditionalRequestHeaders.Add("ignored-header-added-after-clone"); 275options.CurrentValue.LoggingFields = W3CLoggingFields.TimeTaken; 311var optionsAccessor = Mock.Of<IOptionsMonitor<W3CLoggerOptions>>(o => o.CurrentValue == options);
Microsoft.AspNetCore.Tests (4)
WebApplicationTests.cs (2)
1366var options = monitor.CurrentValue; 1379options = monitor.CurrentValue;
WebHostTests.cs (2)
42var options = monitor.CurrentValue; 55options = monitor.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.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); 155if (_options.CurrentValue.FormatterName == null || !_formatters.TryGetValue(_options.CurrentValue.FormatterName, out ConsoleFormatter? logFormatter)) 158logFormatter = _options.CurrentValue.Format switch 165if (_options.CurrentValue.FormatterName == null) 167UpdateFormatterOptions(logFormatter, _options.CurrentValue); 173_loggers.GetOrAdd(name, new ConsoleLogger(name, _messageQueue, logFormatter, _scopeProvider, _options.CurrentValue));
JsonConsoleFormatter.cs (1)
25ReloadLoggerOptions(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 (8)
Buffering\GlobalBuffer.cs (4)
54LastKnownGoodFilterRules = LogBufferingFilterRuleSelector.SelectByCategory(_options.CurrentValue.Rules.ToArray(), _category); 72if (_timeProvider.GetUtcNow() < _lastFlushTimestamp + _options.CurrentValue.AutoFlushDuration) 102if (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);