HostingHostBuilderExtensions.ConfigureMetrics 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ConfigureMetrics(IHostBuilder, Action<HostBuilderContext,IMetricsBuilder>) |
新增用於設定所提供 IMetricsBuilder 的委派。 可能會多次呼叫此項。 |
ConfigureMetrics(IHostBuilder, Action<IMetricsBuilder>) |
新增用於設定所提供 IMetricsBuilder 的委派。 可能會多次呼叫此項。 |
ConfigureMetrics(IHostBuilder, Action<HostBuilderContext,IMetricsBuilder>)
新增用於設定所提供 IMetricsBuilder 的委派。 可能會多次呼叫此項。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureMetrics(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::Hosting::HostBuilderContext ^, Microsoft::Extensions::Diagnostics::Metrics::IMetricsBuilder ^> ^ configureMetrics);
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureMetrics (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.Hosting.HostBuilderContext,Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder> configureMetrics);
static member ConfigureMetrics : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Hosting.HostBuilderContext, Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureMetrics (hostBuilder As IHostBuilder, configureMetrics As Action(Of HostBuilderContext, IMetricsBuilder)) As IHostBuilder
參數
- hostBuilder
- IHostBuilder
要設定的 IHostBuilder。
- configureMetrics
- Action<HostBuilderContext,IMetricsBuilder>
設定 IMetricsBuilder 的委派。
傳回
用於鏈結的相同 IHostBuilder 執行個體。
適用於
ConfigureMetrics(IHostBuilder, Action<IMetricsBuilder>)
新增用於設定所提供 IMetricsBuilder 的委派。 可能會多次呼叫此項。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureMetrics(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::Diagnostics::Metrics::IMetricsBuilder ^> ^ configureMetrics);
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureMetrics (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder> configureMetrics);
static member ConfigureMetrics : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureMetrics (hostBuilder As IHostBuilder, configureMetrics As Action(Of IMetricsBuilder)) As IHostBuilder
參數
- hostBuilder
- IHostBuilder
要設定的 IHostBuilder。
- configureMetrics
- Action<IMetricsBuilder>
設定 IMetricsBuilder 的委派。
傳回
用於鏈結的相同 IHostBuilder 執行個體。