LatencyContextExtensions.AddLatencyContext Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
AddLatencyContext(IServiceCollection) |
Adds latency context. |
AddLatencyContext(IServiceCollection, IConfigurationSection) |
Adds latency context. |
AddLatencyContext(IServiceCollection, Action<LatencyContextOptions>) |
Adds latency context. |
- Source:
- LatencyContextExtensions.cs
Adds latency context.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddLatencyContext(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLatencyContext (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddLatencyContext : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddLatencyContext (services As IServiceCollection) As IServiceCollection
Parameters
- services
- IServiceCollection
The dependency injection container.
Returns
The value of services
.
Applies to
.NET 9 (package-provided) 和其他版本
产品 | 版本 |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
- Source:
- LatencyContextExtensions.cs
Adds latency context.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddLatencyContext(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Configuration::IConfigurationSection ^ section);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLatencyContext (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection section);
static member AddLatencyContext : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfigurationSection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddLatencyContext (services As IServiceCollection, section As IConfigurationSection) As IServiceCollection
Parameters
- services
- IServiceCollection
The dependency injection container.
- section
- IConfigurationSection
The configuration of LatencyContextOptions.
Returns
The value of services
.
Applies to
.NET 9 (package-provided) 和其他版本
产品 | 版本 |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
- Source:
- LatencyContextExtensions.cs
Adds latency context.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddLatencyContext(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Diagnostics::Latency::LatencyContextOptions ^> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLatencyContext (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Diagnostics.Latency.LatencyContextOptions> configure);
static member AddLatencyContext : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Diagnostics.Latency.LatencyContextOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddLatencyContext (services As IServiceCollection, configure As Action(Of LatencyContextOptions)) As IServiceCollection
Parameters
- services
- IServiceCollection
The dependency injection container.
- configure
- Action<LatencyContextOptions>
The LatencyContextOptions configuration delegate.
Returns
The value of services
.
Applies to
.NET 9 (package-provided) 和其他版本
产品 | 版本 |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |