private void OnItemDiscarded(T discard, T value) { if (ItemDiscarded != null) { var args = new ItemDiscardedEventArgs <T>(discard, value); ItemDiscarded(this, args); } }
private static void ItemDiscarded(object sender, ItemDiscardedEventArgs <double> e) { Console.WriteLine("Buffer full. Discarding {0} New item is {1}", e.ItemDiscarded, e.NewItem); }