Ejemplo n.º 1
0
 /// <summary>
 /// The delegate that the counter calls when it has reached its threshold
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 private static void CounterOnThresholdReached(object sender, ThresholdReachedEventArgs args)
 {
     Console.WriteLine($"Counter has reached its threshold.  Threshold = {args.Threshold}, Total Count = {args.TotalCount} ");
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Publish the ThresholdReached event when the threshold has been reached
 /// </summary>
 /// <param name="args"></param>
 private void PublishThresholdReachedEvent(ThresholdReachedEventArgs args)
 {
     ThresholdReached?.Invoke(this, args);
 }