public virtual void DoWork(WorkPerformedEventArgs e) { Console.WriteLine($"Start {e.Name} ..."); int time = e.Hours * 1000; Thread.Sleep(time); WorkPerformed?.Invoke(e); }
public void workPerformed(WorkPerformedEventArgs e) { Console.WriteLine($"Finished after {e.Hours} hours"); }