コード例 #1
0
ファイル: Program.cs プロジェクト: stefanhk31/cs_generics
 static void ItemDiscarded(object sender,
                           ItemDiscardedEventArgs <double> e)
 {
     Console.WriteLine("Buffer full. Discarding {0} New item is {1}",
                       e.ItemDiscarded, e.NewItem
                       );
 }
コード例 #2
0
 private void OneItemDiscarded(T discard, T value)
 {
     if (ItemDiscarded != null)
     {
         var args = new ItemDiscardedEventArgs <T>(discard, value);
         ItemDiscarded(this, args);
     }
 }
コード例 #3
0
 private void OnItemDisgarded(T value, T discard)
 {
     if (ItemDisgarded != null) //this determins of anyone has suscribed to this event
     {
         var args = new ItemDiscardedEventArgs <T>(discard, value);
         ItemDisgarded(this, args);
     }
 }
コード例 #4
0
 private static void ItemDiscarded(object sender, ItemDiscardedEventArgs <double> e)
 {
     Console.WriteLine("Buffer full. Discarding: {0}. New item: {1}.", e.ItemDiscarded, e.NewItem);
 }
コード例 #5
0
 private static void ItemDiscarded(object sender, ItemDiscardedEventArgs <double> e)
 {
     Console.WriteLine($"Discarding {e.ItemDiscarded} and new item is {e.ItemAdded}.");
 }
コード例 #6
0
 private static void ItemDiscarded(object sender,
                                   ItemDiscardedEventArgs <double> e)
 {
     Console.WriteLine($"New item {e.NewItem} added and Buffer is full! So the oldest item {e.ItemDiscarded} is discarded");
 }
コード例 #7
0
 private static void ItemDiscarded(object sender, ItemDiscardedEventArgs <double> e)
 {
     Console.WriteLine($"Buffer Full. Discarding {e.ItemDiscarded}.  New Item is {e.NewItem}");
 }