DiagnosticCounter 类
定义
DiagnosticCounter 是一个抽象类,用作各种计数器* 类(即 EventCounter、PollingCounter、IncrementingEventCounter 和 IncrementingPollingCounter)的父类。DiagnosticCounter 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() |
获取当前实例的 Type。Gets 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) |