4 instantiations of HttpClientLatencyTelemetryOptions
Microsoft.Extensions.Http.Diagnostics.Tests (4)
Latency\HttpClientLatencyTelemetryExtensionsTest.cs (1)
92
HttpClientLatencyTelemetryOptions expectedOptions =
new
()
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (3)
30
hop.Setup(a => a.Value).Returns(new
HttpClientLatencyTelemetryOptions
());
51
hop.Setup(a => a.Value).Returns(new
HttpClientLatencyTelemetryOptions
());
93
hop.Setup(a => a.Value).Returns(new
HttpClientLatencyTelemetryOptions
{ EnableDetailedLatencyBreakdown = false });
20 references to HttpClientLatencyTelemetryOptions
Microsoft.Extensions.Http.Diagnostics (6)
Latency\HttpClientLatencyTelemetryExtensions.cs (5)
32
_ = services.AddOptions<
HttpClientLatencyTelemetryOptions
>();
57
/// <param name="section">The <see cref="IConfigurationSection"/> to use for configuring <see cref="
HttpClientLatencyTelemetryOptions
"/>.</param>
64
.Configure<
HttpClientLatencyTelemetryOptions
>(section);
76
/// <param name="configure">The delegate to configure <see cref="
HttpClientLatencyTelemetryOptions
"/> with.</param>
78
public static IServiceCollection AddHttpClientLatencyTelemetry(this IServiceCollection services, Action<
HttpClientLatencyTelemetryOptions
> configure)
Latency\Internal\HttpLatencyTelemetryHandler.cs (1)
27
IOptions<
HttpClientLatencyTelemetryOptions
> options, IOptions<ApplicationMetadata> appMetdata)
Microsoft.Extensions.Http.Diagnostics.Tests (14)
Latency\HttpClientLatencyTelemetryExtensionsTest.cs (11)
26
act = () => Mock.Of<IServiceCollection>().AddHttpClientLatencyTelemetry((Action<
HttpClientLatencyTelemetryOptions
>)null!);
49
var
options = sp.GetRequiredService<IOptions<
HttpClientLatencyTelemetryOptions
>>().Value;
83
var
options = sp.GetRequiredService<IOptions<
HttpClientLatencyTelemetryOptions
>>().Value;
92
HttpClientLatencyTelemetryOptions
expectedOptions = new()
103
var
options = sp.GetRequiredService<IOptions<
HttpClientLatencyTelemetryOptions
>>().Value;
108
private static IConfigurationSection GetConfigSection(
HttpClientLatencyTelemetryOptions
options)
113
{ $"{nameof(
HttpClientLatencyTelemetryOptions
)}:{nameof(options.EnableDetailedLatencyBreakdown)}", options.EnableDetailedLatencyBreakdown.ToString(CultureInfo.InvariantCulture) },
116
.GetSection($"{nameof(
HttpClientLatencyTelemetryOptions
)}");
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (3)
29
var hop = new Mock<IOptions<
HttpClientLatencyTelemetryOptions
>>();
50
var hop = new Mock<IOptions<
HttpClientLatencyTelemetryOptions
>>();
92
var hop = new Mock<IOptions<
HttpClientLatencyTelemetryOptions
>>();