DiagnosticCounter 類別

定義

DiagnosticCounter 是一個抽象類別,作為各種 Counter* 類別的父系類別,即 EventCounterPollingCounterIncrementingEventCounterIncrementingPollingCounter

C#
public abstract class DiagnosticCounter : IDisposable
C#
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract class DiagnosticCounter : IDisposable
繼承
DiagnosticCounter
衍生
屬性
實作

屬性

DisplayName

取得或設定計數器的顯示名稱。

DisplayUnits

取得或設定計數器的顯示單位。

EventSource

取得此計數器所附加的 EventSource。

Name

取得此計數器的名稱。

方法

AddMetadata(String, String)

將索引鍵/值中繼資料新增至將作為承載一部分的計數器。

Dispose()

EventSource 報告的集合中移除計數器。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

產品 版本
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Standard 2.1