Ejemplo n.º 1
0
 public STPInstancePerformanceCounters(string instance)
 {
     _pcs = new STPInstancePerformanceCounter[(int)STPPerformanceCounterType.LastCounter];
     // STPPerformanceCounters counters = STPPerformanceCounters.Instance;
     for (int i = 0; i < _pcs.Length; i++)
     {
         if (instance != null)
         {
             _pcs[i] = new STPInstancePerformanceCounter(
                 instance,
                 (STPPerformanceCounterType)i);
         }
         else
         {
             _pcs[i] = _stpInstanceNullPerformanceCounter;
         }
     }
 }
Ejemplo n.º 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;
                }
            }
        }
 public STPInstancePerformanceCounters(string instance)
 {
     _pcs = new STPInstancePerformanceCounter[(int)STPPerformanceCounterType.LastCounter];
     // STPPerformanceCounters counters = STPPerformanceCounters.Instance;
     for (int i = 0; i < _pcs.Length; i++)
     {
         if (instance != null)
         {
             _pcs[i] = new STPInstancePerformanceCounter(
                 instance, 
                 (STPPerformanceCounterType) i);
         }
         else
         {
             _pcs[i] = _stpInstanceNullPerformanceCounter;
         }
     }
 }
 // Methods
 static STPInstancePerformanceCounters()
 {
     _stpInstanceNullPerformanceCounter = new STPInstanceNullPerformanceCounter();
 }
Ejemplo n.º 5
0
 // Methods
 static STPInstancePerformanceCounters()
 {
     _stpInstanceNullPerformanceCounter = new STPInstanceNullPerformanceCounter();
 }
Ejemplo n.º 6
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;
				}
			}
		}