Modifier

Partager via


Instrument<T> Constructors

Definition

Overloads

Instrument<T>(Meter, String)

Constructs a new instance of Instrument<T>.

Instrument<T>(Meter, String, String, String)

Create the metrics instrument using the properties meter, name, description, and unit.

Instrument<T>(Meter, String, String, String, IEnumerable<KeyValuePair<String,Object>>)

Initializes a new instance of the Instrument<T> class with the specified meter, name, description, and unit.

Instrument<T>(Meter, String, String, String, IEnumerable<KeyValuePair<String,Object>>, InstrumentAdvice<T>)

Constructs a new instance of Instrument<T>.

Instrument<T>(Meter, String)

Constructs a new instance of Instrument<T>.

protected:
 Instrument(System::Diagnostics::Metrics::Meter ^ meter, System::String ^ name);
protected Instrument (System.Diagnostics.Metrics.Meter meter, string name);
new System.Diagnostics.Metrics.Instrument<'T (requires 'T : struct)> : System.Diagnostics.Metrics.Meter * string -> System.Diagnostics.Metrics.Instrument<'T (requires 'T : struct)>
Protected Sub New (meter As Meter, name As String)

Parameters

meter
Meter

The meter that created the instrument. Cannot be null.

name
String

The instrument name. Cannot be null.

Applies to

Instrument<T>(Meter, String, String, String)

Source:
Instrument.common.cs
Source:
Instrument.common.cs
Source:
Instrument.common.cs

Create the metrics instrument using the properties meter, name, description, and unit.

protected:
 Instrument(System::Diagnostics::Metrics::Meter ^ meter, System::String ^ name, System::String ^ unit, System::String ^ description);
protected Instrument (System.Diagnostics.Metrics.Meter meter, string name, string? unit, string? description);
new System.Diagnostics.Metrics.Instrument<'T (requires 'T : struct)> : System.Diagnostics.Metrics.Meter * string * string * string -> System.Diagnostics.Metrics.Instrument<'T (requires 'T : struct)>
Protected Sub New (meter As Meter, name As String, unit As String, description As String)

Parameters

meter
Meter

The meter that created the instrument.

name
String

The instrument name. Cannot be null.

unit
String

Optional instrument unit of measurements.

description
String

Optional instrument description.

Remarks

All classes that extend Instrument{T} must call this constructor when constructing objects of the extended class.

Applies to

Instrument<T>(Meter, String, String, String, IEnumerable<KeyValuePair<String,Object>>)

Source:
Instrument.common.cs
Source:
Instrument.common.cs

Initializes a new instance of the Instrument<T> class with the specified meter, name, description, and unit.

protected:
 Instrument(System::Diagnostics::Metrics::Meter ^ meter, System::String ^ name, System::String ^ unit, System::String ^ description, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>> ^ tags);
protected Instrument (System.Diagnostics.Metrics.Meter meter, string name, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>>? tags);
new System.Diagnostics.Metrics.Instrument<'T (requires 'T : struct)> : System.Diagnostics.Metrics.Meter * string * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> System.Diagnostics.Metrics.Instrument<'T (requires 'T : struct)>
Protected Sub New (meter As Meter, name As String, unit As String, description As String, tags As IEnumerable(Of KeyValuePair(Of String, Object)))

Parameters

meter
Meter

The meter that created the instrument.

name
String

The instrument name. Cannot be null.

unit
String

An optional instrument unit of measurements.

description
String

An optional instrument description.

tags
IEnumerable<KeyValuePair<String,Object>>

Optional instrument tags.

Remarks

All classes that extend Instrument<T> need to call this constructor when constructing an object of the extended class.

Applies to

Instrument<T>(Meter, String, String, String, IEnumerable<KeyValuePair<String,Object>>, InstrumentAdvice<T>)

Constructs a new instance of Instrument<T>.

protected Instrument (System.Diagnostics.Metrics.Meter meter, string name, string? unit = default, string? description = default, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>>? tags = default, System.Diagnostics.Metrics.InstrumentAdvice<T>? advice = default);
new System.Diagnostics.Metrics.Instrument<'T (requires 'T : struct)> : System.Diagnostics.Metrics.Meter * string * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> * System.Diagnostics.Metrics.InstrumentAdvice<'T (requires 'T : struct)> -> System.Diagnostics.Metrics.Instrument<'T (requires 'T : struct)>
Protected Sub New (meter As Meter, name As String, Optional unit As String = Nothing, Optional description As String = Nothing, Optional tags As IEnumerable(Of KeyValuePair(Of String, Object)) = Nothing, Optional advice As InstrumentAdvice(Of T) = Nothing)

Parameters

meter
Meter

The meter that created the instrument. Cannot be null.

name
String

The instrument name. Cannot be null.

unit
String

Optional instrument unit of measurements.

description
String

Optional instrument description.

tags
IEnumerable<KeyValuePair<String,Object>>

Optional instrument tags.

Applies to