protected virtual void OnRandomDataGenerating( object sender, int bytes, int total) { var args = new RandomDataGeneratingEventArgs { BytesDone = bytes, TotalBytes = total }; if (RandomDataGenerating != null) { RandomDataGenerating(sender, args); } }
private static void OnRandomDataGenerating(object sender, RandomDataGeneratingEventArgs e) { Console.WriteLine($"Generated {e.BytesDone} from {e.TotalBytes} byte(s)..."); }