共用方式為


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)

來源:
Instrument.common.cs
來源:
Instrument.common.cs
來源:
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

選擇性檢測描述。

備註

當建構擴充類別的物件時,擴充檢測{T} 的所有類別都必須呼叫這個建構函式。

適用於

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

來源:
Instrument.common.cs
來源:
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> 擴充的所有類別都需要呼叫這個建構函式。

適用於