Exemplo n.º 1
0
 /// <summary>
 ///     <para>Overriden.  Gets the current value of this performance counter.</para>
 /// </summary>
 /// <returns>
 ///     <para>A <see cref="Single"/> value providing the value of the
 ///     specified instance; always 0 if the couter has not been installed.</para>
 /// </returns>
 public override float GetValue()
 {
     if (IsInitialized && InnerCounter != null)
     {
         return(InnerCounter.NextValue());
     }
     else
     {
         return(0);
     }
 }
 /// <summary>
 /// Registeres new Counter.
 /// If counter with the same has been already existed
 /// it would be replaced with the new one.
 /// </summary>
 /// <param name="name">Counter name.</param>
 /// <param name="args">Accotiative counter values.</param>
 public void Register(string name, params T[] args)
 {
     _counters[name] = new InnerCounter <T>(args);
 }