DiagnosticCounter 類別

定義

DiagnosticCounter 是一個抽象類別,作為各種 Counter* 類別的父系類別,即 EventCounterPollingCounterIncrementingEventCounterIncrementingPollingCounterDiagnosticCounter is an abstract class that serves as the parent class for various Counter* classes, namely EventCounter, PollingCounter, IncrementingEventCounter, and IncrementingPollingCounter.

public ref class DiagnosticCounter abstract : IDisposable
public abstract class DiagnosticCounter : IDisposable
type DiagnosticCounter = class
    interface IDisposable
Public MustInherit Class DiagnosticCounter
Implements IDisposable
繼承
DiagnosticCounter
衍生
實作

屬性

DisplayName

取得或設定計數器的顯示名稱。Gets or sets the display name of the counter.

DisplayUnits

取得或設定計數器的顯示單位。Gets or sets the display units of the counter.

EventSource

取得此計數器所附加的 EventSource。Gets the EventSource that this counter is attached to.

Name

取得此計數器的名稱。Gets the name of this counter.

方法

AddMetadata(String, String)

將索引鍵/值中繼資料新增至將作為承載一部分的計數器。Adds key-value metadata to the counter that will be included as a part of the payload.

Dispose()

EventSource 報告的集合中移除計數器。Removes the counter from the set that the EventSource will report on.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於