Bagikan melalui


MeasurementCallback<T> Delegasikan

Definisi

Delegasi untuk mewakili panggilan balik Meterlistener yang digunakan saat merekam pengukuran.

generic <typename T>
public delegate void MeasurementCallback(Instrument ^ instrument, T measurement, ReadOnlySpan<KeyValuePair<System::String ^, System::Object ^>> tags, System::Object ^ state);
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);
public delegate void MeasurementCallback<T>(Instrument instrument, T measurement, ReadOnlySpan<KeyValuePair<string,object?>> tags, object? state) where T : struct;
type MeasurementCallback<'T> = delegate of Instrument * 'T * ReadOnlySpan<KeyValuePair<string, obj>> * obj -> unit
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)

Jenis parameter

T

Jenis yang diwakili pengukuran.

Parameter

instrument
Instrument

Instrumen yang mengirim pengukuran.

measurement
T

Nilai pengukuran.

tags
ReadOnlySpan<KeyValuePair<String,Object>>

Rentang tag pasangan kunci-nilai yang terkait dengan pengukuran.

state
Object

Objek status awalnya diteruskan ke EnableMeasurementEvents(Instrument, Object) metode .

Metode Ekstensi

GetMethodInfo(Delegate)

Mendapatkan objek yang mewakili metode yang diwakili oleh delegasi yang ditentukan.

Berlaku untuk