MeasurementCallback<T> 委托

定义

表示记录度量值时使用的 Meterlistener 回调的委托。

generic <typename T>
 where T : value classpublic delegate void MeasurementCallback(Instrument ^ instrument, T measurement, ReadOnlySpan<KeyValuePair<System::String ^, System::Object ^>> tags, System::Object ^ state);
public delegate void MeasurementCallback<T>(Instrument instrument, T measurement, ReadOnlySpan<KeyValuePair<string,object?>> tags, object? state) where T : struct;
type MeasurementCallback<'T (requires 'T : struct)> = delegate of Instrument * 'T * ReadOnlySpan<KeyValuePair<string, obj>> * obj -> unit
Public Delegate Sub MeasurementCallback(Of T)(instrument As Instrument, measurement As T, tags As ReadOnlySpan(Of KeyValuePair(Of String, Object)), state As Object)

类型参数

T

度量表示的类型。

参数

instrument
Instrument

发送测量的仪器。

measurement
T

度量值。

tags
ReadOnlySpan<KeyValuePair<String,Object>>

与度量关联的键值对标记范围。

state
Object

最初传递给 EnableMeasurementEvents(Instrument, Object) 方法的状态对象。

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。

适用于