共用方式為


HostingHostBuilderExtensions.ConfigureMetrics 方法

定義

多載

ConfigureMetrics(IHostBuilder, Action<HostBuilderContext,IMetricsBuilder>)

新增用於設定所提供 IMetricsBuilder 的委派。 可能會多次呼叫此項。

ConfigureMetrics(IHostBuilder, Action<IMetricsBuilder>)

新增用於設定所提供 IMetricsBuilder 的委派。 可能會多次呼叫此項。

ConfigureMetrics(IHostBuilder, Action<HostBuilderContext,IMetricsBuilder>)

來源:
HostingHostBuilderExtensions.cs
來源:
HostingHostBuilderExtensions.cs

新增用於設定所提供 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>)

來源:
HostingHostBuilderExtensions.cs
來源:
HostingHostBuilderExtensions.cs

新增用於設定所提供 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 執行個體。

適用於