ObservableInstrument<T> Constructors
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
ObservableInstrument<T>(Meter, String, String, String) |
Initializes a new instance of the ObservableInstrument<T> class using the specified meter, name, description, and unit. All classes that extend ObservableInstrument{T} must call this constructor when constructing objects of the extended class. |
ObservableInstrument<T>(Meter, String, String, String, IEnumerable<KeyValuePair<String,Object>>) |
Initializes a new instance of the ObservableInstrument<T> class with the specified meter, name, description, and unit. |
- Source:
- ObservableInstrument.cs
- Source:
- ObservableInstrument.cs
- Source:
- ObservableInstrument.cs
- Source:
- ObservableInstrument.cs
- Source:
- ObservableInstrument.cs
Initializes a new instance of the ObservableInstrument<T> class using the specified meter, name, description, and unit. All classes that extend ObservableInstrument{T} must call this constructor when constructing objects of the extended class.
protected:
ObservableInstrument(System::Diagnostics::Metrics::Meter ^ meter, System::String ^ name, System::String ^ unit, System::String ^ description);
protected ObservableInstrument (System.Diagnostics.Metrics.Meter meter, string name, string? unit, string? description);
new System.Diagnostics.Metrics.ObservableInstrument<'T (requires 'T : struct)> : System.Diagnostics.Metrics.Meter * string * string * string -> System.Diagnostics.Metrics.ObservableInstrument<'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.
Applies to
.NET 9 and other versions
Product | Versions |
---|---|
.NET | 6, 7, 8 (package-provided), 8, 9 (package-provided), 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- Source:
- ObservableInstrument.cs
- Source:
- ObservableInstrument.cs
- Source:
- ObservableInstrument.cs
- Source:
- ObservableInstrument.cs
Initializes a new instance of the ObservableInstrument<T> class with the specified meter, name, description, and unit.
protected:
ObservableInstrument(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 ObservableInstrument (System.Diagnostics.Metrics.Meter meter, string name, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>> tags);
protected ObservableInstrument (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.ObservableInstrument<'T (requires 'T : struct)> : System.Diagnostics.Metrics.Meter * string * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> System.Diagnostics.Metrics.ObservableInstrument<'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>>
The tags to attach to the counter.
Remarks
All classes extending ObservableInstrument<T> need to call this constructor when constructing an object of the extended class.
Applies to
.NET 9 and other versions
Product | Versions |
---|---|
.NET | 8 (package-provided), 8, 9 (package-provided), 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: