CounterSet 類別

定義

定義一組邏輯計數器。Defines a set of logical counters.

public ref class CounterSet : IDisposable
public class CounterSet : IDisposable
type CounterSet = class
    interface IDisposable
Public Class CounterSet
Implements IDisposable
繼承
CounterSet
實作

範例

如需範例,請參閱 System.Diagnostics.PerformanceDataFor an example, see System.Diagnostics.PerformanceData.

備註

當您完成移除提供者的註冊, 並釋放所有受控和非受控資源時, 請呼叫方法。DisposeCall the Dispose method when you are finished to remove your provider's registration and to release all managed and unmanaged resources.

建構函式

CounterSet(Guid, Guid, CounterSetInstanceType)

初始化 CounterSet 類別的新執行個體。Initializes a new instance of the CounterSet class.

方法

AddCounter(Int32, CounterType)

使用指定的計數器識別項和型別,將計數器加入至計數器集合。Adds a counter to the counter set by using the specified counter identifier and type.

AddCounter(Int32, CounterType, String)

使用指定的計數器識別項和型別以及計數器的顯示名稱,將計數器加入至計數器集合。Adds a counter to the counter set by using the specified counter identifier and type and a display name for the counter.

CreateCounterSetInstance(String)

建立計數器集合的執行個體。Creates an instance of the counter set.

Dispose()

釋放這個物件使用的所有 Unmanaged 資源。Releases all unmanaged resources used by this object.

Dispose(Boolean)

釋放此物件所使用的全部 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases all unmanaged resources used by this object and optionally release the managed resources.

Equals(Object)

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

(繼承來源 Object)
Finalize()

在記憶體回收收回物件前釋放資源。Frees resources before the object is reclaimed by garbage collection.

GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetType()

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

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

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

(繼承來源 Object)

適用於