PollingCounter(String, EventSource, Func<Double>) 构造函数

定义

初始化 PollingCounter 类的新实例。Initializes a new instance of the PollingCounter class.

public:
 PollingCounter(System::String ^ name, System::Diagnostics::Tracing::EventSource ^ eventSource, Func<double> ^ metricProvider);
public PollingCounter (string name, System.Diagnostics.Tracing.EventSource eventSource, Func<double> metricProvider);
new System.Diagnostics.Tracing.PollingCounter : string * System.Diagnostics.Tracing.EventSource * Func<double> -> System.Diagnostics.Tracing.PollingCounter
Public Sub New (name As String, eventSource As EventSource, metricProvider As Func(Of Double))

参数

name
String

PollingCounter 实例的名称。The name for this PollingCounter instance.

eventSource
EventSource

事件源。The event source.

metricProvider
Func<Double>

将用于轮询值的方法。A method that will be used to poll the value.

适用于