HostingHostBuilderExtensions.ConfigureMetrics 方法

定义

重载

ConfigureMetrics(IHostBuilder, Action<HostBuilderContext,IMetricsBuilder>)

添加一个委托来配置提供的 IMetricsBuilder。 这可多次进行调用。

ConfigureMetrics(IHostBuilder, Action<IMetricsBuilder>)

添加一个委托来配置提供的 IMetricsBuilder。 这可多次进行调用。

ConfigureMetrics(IHostBuilder, Action<HostBuilderContext,IMetricsBuilder>)

Source:
HostingHostBuilderExtensions.cs
Source:
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>)

Source:
HostingHostBuilderExtensions.cs
Source:
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 实例。

适用于