MetricsBuilderConfigurationExtensions.AddConfiguration 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从提供的 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
参数
- builder
- IMetricsBuilder
- configuration
- IConfiguration
要加载的配置节。
返回
用于链接的原始 IMetricsBuilder 。