Rediger

Del via


MeterListener Class

Definition

The MeterListener is class used to listen to the metrics instrument measurements recording.

public ref class MeterListener sealed : IDisposable
public sealed class MeterListener : IDisposable
type MeterListener = class
    interface IDisposable
Public NotInheritable Class MeterListener
Implements IDisposable
Inheritance
MeterListener
Implements

Constructors

MeterListener()

Initializes a new instance of the MeterListener class.

Properties

InstrumentPublished

Gets or sets the callback to get notified when an instrument is published.

MeasurementsCompleted

Gets or sets the callback to get notified when the measurement is stopped on some instrument. This can happen when the Meter or the Listener is disposed or calling Dispose() on the listener.

Methods

DisableMeasurementEvents(Instrument)

Stops listening to a specific instrument measurement recording.

Dispose()

Disposes the listeners which will stop it from listening to any instrument.

EnableMeasurementEvents(Instrument, Object)

Starts listening to a specific instrument measurement recording.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RecordObservableInstruments()

Calls all Observable instruments that the listener is listening to, and calls SetMeasurementEventCallback<T>(MeasurementCallback<T>) with every collected measurement.

SetMeasurementEventCallback<T>(MeasurementCallback<T>)

Sets a callback for a specific numeric type to get the measurement recording notification from all instruments which enabled listening and was created with the same specified numeric type. If a measurement of type T is recorded and a callback of type T is registered, that callback will be used.

Start()

Enables the listener to start listening to instruments measurement recording.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to