52 instantiations of LoggingOptions
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (1)
Benchmarks\HeadersReaderBenchmark.cs (1)
41var options = new LoggingOptions { LogContentHeaders = LogContentHeaders };
Microsoft.Extensions.Http.Diagnostics.Tests (51)
Logging\HttpClientLoggerTest.cs (15)
57var options = new LoggingOptions 90var options = new LoggingOptions(); 138var options = new LoggingOptions(); 202var options = new LoggingOptions 294var options = new LoggingOptions 401var options = new LoggingOptions 497var options = new LoggingOptions 611var options = new LoggingOptions 667var options = new LoggingOptions(); 708var options = new LoggingOptions 757var options = new LoggingOptions(); 808new LoggingOptions()), 881var options = new LoggingOptions 946var options = new LoggingOptions(); 995var options = new LoggingOptions();
Logging\HttpHeadersReaderTest.cs (4)
25var options = new LoggingOptions(); 50var options = new LoggingOptions 112var options = new LoggingOptions 172var options = new LoggingOptions();
Logging\HttpRequestBodyReaderTest.cs (11)
34var options = new LoggingOptions 54var options = new LoggingOptions 78var options = new LoggingOptions 99var options = new LoggingOptions 125var options = new LoggingOptions 149var options = new LoggingOptions 171var options = new LoggingOptions 204var options = new LoggingOptions 225var options = new LoggingOptions 246var reader = new HttpRequestBodyReader(new(), DebuggerState.Attached); 255var options = new LoggingOptions { BodyReadTimeout = timeout };
Logging\HttpRequestReaderTest.cs (8)
59var options = new LoggingOptions 125var options = new LoggingOptions 185var opts = new LoggingOptions 257var opts = new LoggingOptions 330var opts = new LoggingOptions 390var opts = new LoggingOptions 461var opts = new LoggingOptions 528var opts = new LoggingOptions
Logging\HttpResponseBodyReaderTest.cs (8)
33var options = new LoggingOptions 53var options = new LoggingOptions 76var options = new LoggingOptions 96var options = new LoggingOptions 119var options = new LoggingOptions 140var options = new LoggingOptions 167var options = new LoggingOptions(); 177var options = new LoggingOptions { BodyReadTimeout = timeout };
Logging\LoggingOptionsTest.cs (2)
19_sut = new LoggingOptions(); 25var sut = new LoggingOptions();
Logging\LoggingOptionsValidatorTest.cs (3)
25var result = validator.Validate("model", new LoggingOptions()); 34var options = new LoggingOptions { BodyReadTimeout = TimeSpan.Zero }; 43var options = new LoggingOptions { BodySizeLimit = -1 };
115 references to LoggingOptions
Microsoft.Extensions.Http.Diagnostics (19)
Logging\HttpClientLoggingHttpClientBuilderExtensions.cs (5)
44/// <param name="section">The <see cref="IConfigurationSection"/> to use for configuring <see cref="LoggingOptions"/>.</param> 64/// <param name="configure">The delegate to configure <see cref="LoggingOptions"/> with.</param> 72public static IHttpClientBuilder AddExtendedHttpClientLogging(this IHttpClientBuilder builder, Action<LoggingOptions> configure) 80private static IHttpClientBuilder AddExtendedHttpClientLoggingInternal(IHttpClientBuilder builder, Action<OptionsBuilder<LoggingOptions>>? configureOptionsBuilder = null) 83.AddOptionsWithValidateOnStart<LoggingOptions, LoggingOptionsValidator>(builder.Name);
Logging\HttpClientLoggingServiceCollectionExtensions.cs (5)
55/// <param name="section">The <see cref="IConfigurationSection"/> to use for configuring <see cref="LoggingOptions"/>.</param> 67.AddOptionsWithValidateOnStart<LoggingOptions, LoggingOptionsValidator>() 77/// <param name="configure">The delegate to configure <see cref="LoggingOptions"/> with.</param> 83public static IServiceCollection AddExtendedHttpClientLogging(this IServiceCollection services, Action<LoggingOptions> configure) 89.AddOptionsWithValidateOnStart<LoggingOptions, LoggingOptionsValidator>()
Logging\Internal\HttpClientLogger.cs (2)
43IOptionsMonitor<LoggingOptions> optionsMonitor, 57LoggingOptions options)
Logging\Internal\HttpHeadersReader.cs (2)
26public HttpHeadersReader(IOptionsMonitor<LoggingOptions> optionsMonitor, IHttpHeadersRedactor redactor, [ServiceKey] string? serviceKey = null) 28var options = optionsMonitor.GetKeyedOrCurrent(serviceKey);
Logging\Internal\HttpRequestBodyReader.cs (1)
36public HttpRequestBodyReader(LoggingOptions requestOptions, IDebuggerState? debugger = null)
Logging\Internal\HttpRequestReader.cs (2)
47IOptionsMonitor<LoggingOptions> optionsMonitor, 64LoggingOptions options,
Logging\Internal\HttpResponseBodyReader.cs (1)
31public HttpResponseBodyReader(LoggingOptions responseOptions, IDebuggerState? debugger = null)
Logging\Internal\LoggingOptionsValidator.cs (1)
9internal sealed partial class LoggingOptionsValidator : IValidateOptions<LoggingOptions>
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (2)
Benchmarks\HeadersReaderBenchmark.cs (2)
41var options = new LoggingOptions { LogContentHeaders = LogContentHeaders }; 48_headersReader = new HttpHeadersReader(new StaticOptionsMonitor<LoggingOptions>(options), redactor);
Microsoft.Extensions.Http.Diagnostics.Tests (94)
Logging\AcceptanceTests.cs (20)
471var optionsFirst = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(FirstClientName); 472var optionsSecond = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(SecondClientName); 506var optionsFirst = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(nameof(ITestHttpClient1)); 507var optionsSecond = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(nameof(ITestHttpClient2)); 556var optionsFirst = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(nameof(ITestHttpClient1)); 557var optionsSecond = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(nameof(ITestHttpClient2)); 558var optionsThird = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get("testClient3"); 559var optionsFourth = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get("testClient4"); 560var optionsFifth = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get("testClient5"); 561var optionsSixth = provider.GetRequiredService<IOptions<LoggingOptions>>().Value;
Logging\HttpClientLoggerTest.cs (14)
57var options = new LoggingOptions 90var options = new LoggingOptions(); 138var options = new LoggingOptions(); 202var options = new LoggingOptions 294var options = new LoggingOptions 401var options = new LoggingOptions 497var options = new LoggingOptions 611var options = new LoggingOptions 667var options = new LoggingOptions(); 708var options = new LoggingOptions 757var options = new LoggingOptions(); 881var options = new LoggingOptions 946var options = new LoggingOptions(); 995var options = new LoggingOptions();
Logging\HttpClientLoggingExtensionsTest.cs (20)
46act = () => Mock.Of<IHttpClientBuilder>().AddExtendedHttpClientLogging((Action<LoggingOptions>)null!); 65act = () => Mock.Of<IServiceCollection>().AddExtendedHttpClientLogging((Action<LoggingOptions>)null!); 93var optionsFirst = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get("test1"); 94var optionsSecond = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get("test2"); 116var optionsFirst = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(nameof(ITestHttpClient1)); 117var optionsSecond = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(nameof(ITestHttpClient2)); 139var options = provider.GetRequiredService<IOptions<LoggingOptions>>().Value; 178var options = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get("test"); 234var options = provider 235.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get("test"); 288var options = provider.GetRequiredService<IOptions<LoggingOptions>>().Value; 384var options = provider 385.GetRequiredService<IOptions<LoggingOptions>>().Value;
Logging\HttpHeadersReaderTest.cs (4)
25var options = new LoggingOptions(); 50var options = new LoggingOptions 112var options = new LoggingOptions 172var options = new LoggingOptions();
Logging\HttpRequestBodyReaderTest.cs (10)
34var options = new LoggingOptions 54var options = new LoggingOptions 78var options = new LoggingOptions 99var options = new LoggingOptions 125var options = new LoggingOptions 149var options = new LoggingOptions 171var options = new LoggingOptions 204var options = new LoggingOptions 225var options = new LoggingOptions 255var options = new LoggingOptions { BodyReadTimeout = timeout };
Logging\HttpRequestReaderTest.cs (8)
59var options = new LoggingOptions 125var options = new LoggingOptions 185var opts = new LoggingOptions 257var opts = new LoggingOptions 330var opts = new LoggingOptions 390var opts = new LoggingOptions 461var opts = new LoggingOptions 528var opts = new LoggingOptions
Logging\HttpResponseBodyReaderTest.cs (8)
33var options = new LoggingOptions 53var options = new LoggingOptions 76var options = new LoggingOptions 96var options = new LoggingOptions 119var options = new LoggingOptions 140var options = new LoggingOptions 167var options = new LoggingOptions(); 177var options = new LoggingOptions { BodyReadTimeout = timeout };
Logging\Internal\HelperExtensions.cs (3)
26public static IOptionsMonitor<LoggingOptions> ToOptionsMonitor(this LoggingOptions options, string? key = null) 28var snapshotMock = new Mock<IOptionsMonitor<LoggingOptions>>();
Logging\Internal\TestConfiguration.cs (3)
22$"{nameof(LoggingOptions)}:{nameof(LoggingOptions.BodyReadTimeout)}", 27.GetSection($"{nameof(LoggingOptions)}");
Logging\LoggingOptionsTest.cs (2)
15private readonly LoggingOptions _sut; 25var sut = new LoggingOptions();
Logging\LoggingOptionsValidatorTest.cs (2)
34var options = new LoggingOptions { BodyReadTimeout = TimeSpan.Zero }; 43var options = new LoggingOptions { BodySizeLimit = -1 };