public void DoLotsOfStuff()
 {
     for (var i = 0; i < 100; i++)
     {
         DoWork();
         var args = new WorkEventArgs();
         args.Percent = i;
         RaisedEvent(args);
         if (args.Cancel)
         {
             return;
         }
     }
 }
 private static void OnEventProgrssRcv(object sender, WorkEventArgs e)
 {
     System.Console.WriteLine($"OnEventProgrssRcv : {e.Percent}");
 }
 protected virtual void RaisedEvent(WorkEventArgs args)
 {
     OnProgress?.Invoke(this, args);
 }
 protected override void RaisedEvent(WorkEventArgs args)
 {
     OnProgress?.Invoke(this, args);
 }