/// <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; } } }
/// <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); }
/// <summary> /// Increment the both the numerator and denominator. Note that this is threadsafe. /// </summary> public virtual void AddHit() { SampleFraction.Increment(); SampleBase.Increment(); }