Пример #1
0
        public STPInstancePerformanceCounters(String instance)
        {
            _isDisposed = false;
            _pcs        = new STPInstancePerformanceCounter[(int)STPPerformanceCounterType.LastCounter];

            // Call the STPPerformanceCounters.Instance so the static constructor will
            // intialize the STPPerformanceCounters singleton.
            STPPerformanceCounters.Instance.GetHashCode();

            for (int i = 0; i < _pcs.Length; i++)
            {
                if (instance != null)
                {
                    _pcs[i] = new STPInstancePerformanceCounter(
                        instance,
                        (STPPerformanceCounterType)i);
                }
                else
                {
                    _pcs[i] = _stpInstanceNullPerformanceCounter;
                }
            }
        }
Пример #2
0
        public STPInstancePerformanceCounters(String instance)
        {
            _isDisposed = false;
            _pcs = new STPInstancePerformanceCounter[(int)STPPerformanceCounterType.LastCounter];

            // Call the STPPerformanceCounters.Instance so the static constructor will
            // intialize the STPPerformanceCounters singleton.
            STPPerformanceCounters.Instance.GetHashCode();

            for (int i = 0; i < _pcs.Length; i++)
            {
                if (instance != null)
                {
                    _pcs[i] = new STPInstancePerformanceCounter(
                        instance,
                        (STPPerformanceCounterType) i);
                }
                else
                {
                    _pcs[i] = _stpInstanceNullPerformanceCounter;
                }
            }
        }
Пример #3
0
 // Methods
 static STPInstancePerformanceCounters()
 {
     _stpInstanceNullPerformanceCounter = new STPInstanceNullPerformanceCounter();
 }
Пример #4
0
 // Methods
 static STPInstancePerformanceCounters()
 {
     _stpInstanceNullPerformanceCounter = new STPInstanceNullPerformanceCounter();
 }