9 instantiations of RequestLatencyTelemetryOptions
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (9)
Latency\RequestLatencyTelemetryExtensionsTests.cs (1)
52
RequestLatencyTelemetryOptions expectedOptions =
new
()
Latency\RequestLatencyTelemetryMiddlewareTests.cs (6)
33
Options.Create(new
RequestLatencyTelemetryOptions
()), new List<ILatencyDataExporter> { ex1, ex2 },
63
Options.Create(new
RequestLatencyTelemetryOptions
()),
92
Options.Create(new
RequestLatencyTelemetryOptions
()), new List<ILatencyDataExporter> { ex1, ex2 },
121
Options.Create(new
RequestLatencyTelemetryOptions
()),
150
Options.Create(new
RequestLatencyTelemetryOptions
()),
172
Options.Create(new
RequestLatencyTelemetryOptions
{ LatencyDataExportTimeout = exportTimeout }),
Latency\RequestLatencyTelemetryOptionsValidatorTests.cs (2)
15
var options = new
RequestLatencyTelemetryOptions
{ LatencyDataExportTimeout = TimeSpan.FromSeconds(0) };
24
var options = new
RequestLatencyTelemetryOptions
{ LatencyDataExportTimeout = TimeSpan.FromSeconds(1) };
16 references to RequestLatencyTelemetryOptions
Microsoft.AspNetCore.Diagnostics.Middleware (7)
Latency\RequestLatencyTelemetryMiddleware.cs (1)
37
IOptions<
RequestLatencyTelemetryOptions
> options,
Latency\RequestLatencyTelemetryOptionsValidator.cs (1)
9
internal sealed partial class RequestLatencyTelemetryOptionsValidator : IValidateOptions<
RequestLatencyTelemetryOptions
>
Latency\RequestLatencyTelemetryServiceCollectionExtensions.cs (5)
42
_ = services.AddOptionsWithValidateOnStart<
RequestLatencyTelemetryOptions
, RequestLatencyTelemetryOptionsValidator>();
51
/// <param name="configure">Configuration of <see cref="
RequestLatencyTelemetryOptions
"/>.</param>
54
public static IServiceCollection AddRequestLatencyTelemetry(this IServiceCollection services, Action<
RequestLatencyTelemetryOptions
> configure)
63
/// <param name="section">Configuration of <see cref="
RequestLatencyTelemetryOptions
"/>.</param>
68
.Configure<
RequestLatencyTelemetryOptions
>(Throw.IfNull(section))
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (9)
Latency\RequestLatencyTelemetryExtensionsTests.cs (5)
52
RequestLatencyTelemetryOptions
expectedOptions = new()
62
var actualOptions = serviceProvider.GetRequiredService<IOptions<
RequestLatencyTelemetryOptions
>>();
67
private static IConfigurationSection GetConfigSection(
RequestLatencyTelemetryOptions
options)
72
{ $"{nameof(
RequestLatencyTelemetryOptions
)}:{nameof(options.LatencyDataExportTimeout)}", options.LatencyDataExportTimeout.ToString() },
75
.GetSection($"{nameof(
RequestLatencyTelemetryOptions
)}");
Latency\RequestLatencyTelemetryOptionsValidatorTests.cs (4)
15
var
options = new RequestLatencyTelemetryOptions { LatencyDataExportTimeout = TimeSpan.FromSeconds(0) };
17
Assert.True(validator.Validate(nameof(
RequestLatencyTelemetryOptions
), options).Failed);
24
var
options = new RequestLatencyTelemetryOptions { LatencyDataExportTimeout = TimeSpan.FromSeconds(1) };
25
var validationResult = validator.Validate(nameof(
RequestLatencyTelemetryOptions
), options);