共用方式為


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

適用於