public CTPInstancePerformanceCounters(string instance) { _isDisposed = false; _pcs = new CTPInstancePerformanceCounter[(int)CTPPerformanceCounterType.LastCounter]; // Call the CTPPerformanceCounters.Instance so the static constructor will // intialize the CTPPerformanceCounters singleton. CTPPerformanceCounters.Instance.GetHashCode(); for (int i = 0; i < _pcs.Length; i++) { if (instance != null) { _pcs[i] = new CTPInstancePerformanceCounter( instance, (CTPPerformanceCounterType)i); } else { _pcs[i] = _ctpInstanceNullPerformanceCounter; } } }
// Methods static CTPInstancePerformanceCounters() { _ctpInstanceNullPerformanceCounter = new CTPInstanceNullPerformanceCounter(); }