Instrument<T> 构造函数

定义

重载

Instrument<T>(Meter, String)

构造 Instrument<T>的新实例。

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

使用属性计量、名称、说明和单位创建指标检测。

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

使用指定的计量、名称、说明和单元初始化 Instrument<T> 类的新实例。

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

构造 Instrument<T>的新实例。

Instrument<T>(Meter, String)

构造 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)

参数

meter
Meter

创建仪器的计量器。 不能 null

name
String

检测名称。 不能 null

适用于

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

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

使用属性计量、名称、说明和单位创建指标检测。

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)

参数

meter
Meter

创建仪器的计量器。

name
String

检测名称。 不能 null

unit
String

可选的测量单位。

description
String

可选检测说明。

注解

在构造扩展类的对象时,扩展 Instruments{T} 的所有类都必须调用此构造函数。

适用于

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

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

使用指定的计量、名称、说明和单元初始化 Instrument<T> 类的新实例。

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)))

参数

meter
Meter

创建仪器的计量器。

name
String

检测名称。 不能 null

unit
String

可选的测量单位。

description
String

可选检测说明。

tags
IEnumerable<KeyValuePair<String,Object>>

可选检测标记。

注解

在构造扩展类的对象时,扩展 Instrument<T> 的所有类都需要调用此构造函数。

适用于

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

构造 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)

参数

meter
Meter

创建仪器的计量器。 不能 null

name
String

检测名称。 不能 null

unit
String

可选的测量单位。

description
String

可选检测说明。

tags
IEnumerable<KeyValuePair<String,Object>>

可选检测标记。

适用于