Пример #1
0
 /// <summary>
 /// Sets an existing KPI to a new value using an eKPINames enum
 /// </summary>
 /// <param name="eKPI">Enum that determines which KPI to set</param>
 /// <param name="value">Value of the KPI to set</param>
 public static void SetKPI(eKPINames eKPI, long value)
 {
     if (KPIs != null)
     {
         Interlocked.Exchange(ref KPIs[(int)eKPI], value);
     }
 }
Пример #2
0
 /// <summary>
 /// Increments an existing KPI by a given amount using an eKPINames enum.
 /// </summary>
 /// <param name="eKPI">Enum that determines which KPI to increment</param>
 /// <param name="value">The value to add to the KPI</param>
 public static void IncrementKPI(eKPINames eKPI, long value)
 {
     if (KPIs != null)
     {
         Interlocked.Add(ref KPIs[(int)eKPI], value);
     }
 }
Пример #3
0
 /// <summary>
 /// Decrements an existing KPI by 1 using an eKPINames enum.
 /// </summary>
 /// <param name="eKPI">Enum that determines which KPI to decrement</param>
 public static void DecrementKPI(eKPINames eKPI)
 {
     if (KPIs != null)
     {
         Interlocked.Decrement(ref KPIs[(int)eKPI]);
     }
 }
Пример #4
0
        /// <summary>
        /// Return the value of an existing KPI using an eKPINames enum
        /// </summary>
        /// <param name="eKPI">Enum that determines which KPI value to return</param>
        /// <returns>The value of the KPI</returns>
        public static long GetKPI(eKPINames eKPI)
        {
            long kpi = 0;

            if (KPIs != null)
            {
                kpi = Interlocked.Read(ref KPIs[(int)eKPI]);
            }
            return(kpi);
        }
Пример #5
0
 /// <summary>
 /// Increments an existing KPI by 1 using an eKPINames enum.
 /// </summary>
 /// <param name="eKPI">Enum that determines which KPI to increment</param>
 public void IncrementKPI(eKPINames eKPI)
 {
     TheCDEKPIs.IncrementKPI(eKPI);
 }