CounterSet CounterSet CounterSet CounterSet Class

定義

定義一組邏輯計數器。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
繼承
CounterSetCounterSetCounterSetCounterSet
實作

範例

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

備註

呼叫Dispose方法,當您完成以移除您的提供者註冊,並釋放所有 managed 和 unmanaged 資源。Call 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(Guid, Guid, CounterSetInstanceType) CounterSet(Guid, Guid, CounterSetInstanceType) CounterSet(Guid, Guid, CounterSetInstanceType)

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

方法

AddCounter(Int32, CounterType) AddCounter(Int32, CounterType) AddCounter(Int32, CounterType) AddCounter(Int32, CounterType)

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

AddCounter(Int32, CounterType, String) AddCounter(Int32, CounterType, String) AddCounter(Int32, CounterType, String) 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) CreateCounterSetInstance(String) CreateCounterSetInstance(String) CreateCounterSetInstance(String)

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

Dispose() Dispose() Dispose() Dispose()

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

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

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

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
Finalize() Finalize() Finalize() Finalize()

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

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

(Inherited from Object)
ToString() ToString() ToString() ToString()

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

(Inherited from Object)

適用於