/// <summary>
 /// create a counter
 /// </summary>
 public IPerfmonCounter CreateCounter(string catagory, string name)
 {
     IPerfmonCounter returnValue = null;
     if (_enableCounters)
     {
         returnValue = new SystemPerfmonCounter(catagory, name);
     }
     if (returnValue == null)
     {
         return new NullCounter();
     }
     return returnValue;
 }
示例#2
0
        /// <summary>
        /// create a counter
        /// </summary>
        public IPerfmonCounter CreateCounter(string catagory, string name)
        {
            IPerfmonCounter returnValue = null;

#if NETFULL
            if (_enableCounters)
            {
                returnValue = new SystemPerfmonCounter(catagory, name);
            }
#endif
            if (returnValue == null)
            {
                return(new NullCounter());
            }
            return(returnValue);
        }