Прочетете на английски

Споделяне чрез


LatencyContextExtensions.AddLatencyContext Method

Definition

Overloads

AddLatencyContext(IServiceCollection)

Source:
LatencyContextExtensions.cs

Adds latency context.

C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLatencyContext(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);

Parameters

services
IServiceCollection

The dependency injection container.

Returns

The value of services.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

AddLatencyContext(IServiceCollection, IConfigurationSection)

Source:
LatencyContextExtensions.cs

Adds latency context.

C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLatencyContext(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection section);

Parameters

services
IServiceCollection

The dependency injection container.

section
IConfigurationSection

The configuration of LatencyContextOptions.

Returns

The value of services.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

AddLatencyContext(IServiceCollection, Action<LatencyContextOptions>)

Source:
LatencyContextExtensions.cs

Adds latency context.

C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLatencyContext(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Diagnostics.Latency.LatencyContextOptions> configure);

Parameters

services
IServiceCollection

The dependency injection container.

configure
Action<LatencyContextOptions>

The LatencyContextOptions configuration delegate.

Returns

The value of services.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)