MetricsBuilderConfigurationExtensions.AddConfiguration 方法

定义

从提供的 IConfiguration 部分读取指标配置,并配置已启用的 计量仪器IMetricsListeners

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Diagnostics::Metrics::IMetricsBuilder ^ AddConfiguration(Microsoft::Extensions::Diagnostics::Metrics::IMetricsBuilder ^ builder, Microsoft::Extensions::Configuration::IConfiguration ^ configuration);
public static Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder AddConfiguration (this Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration);
static member AddConfiguration : Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder * Microsoft.Extensions.Configuration.IConfiguration -> Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder
<Extension()>
Public Function AddConfiguration (builder As IMetricsBuilder, configuration As IConfiguration) As IMetricsBuilder

参数

configuration
IConfiguration

要加载的配置节。

返回

用于链接的原始 IMetricsBuilder

适用于