示例#1
0
 /// <summary>
 /// Dispose pattern.
 /// </summary>
 /// <param name="disposing">
 /// True if being called from Dispose, false if from the finalizer.
 /// </param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (SampleFraction != null)
         {
             SampleFraction.Dispose();
             SampleFraction = null;
         }
         if (SampleBase != null)
         {
             SampleBase.Dispose();
             SampleBase = null;
         }
     }
 }
示例#2
0
 /// <summary>
 /// Increment both the numerator and denominator. Note that this is threadsafe.
 /// </summary>
 /// <param name="value">
 /// The number of hits to add.
 /// </param>
 public virtual void AddHits(long value)
 {
     SampleFraction.IncrementBy(value);
     SampleBase.IncrementBy(value);
 }
示例#3
0
 /// <summary>
 /// Increment the both the numerator and denominator. Note that this is threadsafe.
 /// </summary>
 public virtual void AddHit()
 {
     SampleFraction.Increment();
     SampleBase.Increment();
 }