Пример #1
0
 /// <summary>
 /// Raises the <see cref="UnpublishedSamples"/> event.
 /// </summary>
 /// <param name="seconds">Total number of unpublished seconds of data.</param>
 protected virtual void OnUnpublishedSamples(int seconds)
 {
     try
     {
         UnpublishedSamples?.Invoke(this, new EventArgs <int>(seconds));
     }
     catch (Exception ex)
     {
         // We protect our code from consumer thrown exceptions
         OnProcessException(MessageLevel.Info, new InvalidOperationException($"Exception in consumer handler for UnpublishedSamples event: {ex.Message}", ex), "ConsumerEventException");
     }
 }
Пример #2
0
 // Raise unpublished samples event on behalf of each item in collection
 private void item_UnpublishedSamples(object sender, EventArgs <int> e) => UnpublishedSamples?.Invoke(sender, e);