Idioma

IMetricsListener.InstrumentPublished(Instrument, Object) Método

Definição

Chamado quando um novo instrumento é criado e habilitado por uma regra correspondente.

public:
 bool InstrumentPublished(System::Diagnostics::Metrics::Instrument ^ instrument, [Runtime::InteropServices::Out] System::Object ^ % userState);
public bool InstrumentPublished(System.Diagnostics.Metrics.Instrument instrument, out object? userState);
abstract member InstrumentPublished : System.Diagnostics.Metrics.Instrument * obj -> bool
Public Function InstrumentPublished (instrument As Instrument, ByRef userState As Object) As Boolean

Parâmetros

instrument
Instrument

O novo Instrument.

userState
Object

Estado do ouvinte associado a este instrumento. Isso será retornado para MeasurementCallback<T> e MeasurementsCompleted(Instrument, Object).

Retornos

true se o ouvinte quiser assinar este instrumento, caso contrário false.

Aplica-se a