示例#1
0
 /// <summary>
 /// Gets the <see cref="PerformanceCounter" /> with the specified counter name.
 /// </summary>
 /// <value>
 /// The <see cref="PerformanceCounter" />.
 /// </value>
 /// <param name="counterName">Name of the counter.</param>
 /// <returns></returns>
 public PerformanceCounter this[PerfCounter counterName] {
     get {
         var retval = CountersAvailable.ContainsKey(counterName) ? CountersAvailable[counterName] : null;
         return(retval);
     }
 }
示例#2
0
 /// <summary>
 /// Gets the <see cref="PerformanceCounter"/> with the specified counter name.
 /// </summary>
 /// <value>
 /// The <see cref="PerformanceCounter"/>.
 /// </value>
 /// <param name="counterName">Name of the counter.</param>
 /// <returns></returns>
 public PerformanceCounter this[Enums.PerfCounter counterName] {
     get {
         return(CountersAvailable.ContainsKey(counterName) ? CountersAvailable[counterName] : null);
     }
 }