public virtual void DoWork(int hours, WorkType workType)
        {
            for (int i = 0; i < hours; i++)
            {
                for (int j = 0; j < 100000; j++)
                {
                    ;
                }
                var e = new WorkPerformedEventArgs
                {
                    Hours    = i + 1,
                    WorkType = workType
                };

                OnWorkPerformed(this, e);
            }

            OnWorkComplete(this, EventArgs.Empty);

            //if (WorkComplete != null)
            //{
            //	WorkComplete(this , EventArgs.Empty);
            //}
        }
 protected virtual void OnWorkPerformed(object sender, WorkPerformedEventArgs e)
 {
     WorkPerformed?.Invoke(sender, e);            // если не null,то вызовем invoke
 }
 private static void OnWorkerWorkPerformed(object sender, WorkPerformedEventArgs e)
 {
     Console.WriteLine($"1 Work of type' { e.WorkType}' performed for about { e.Hours} hours");
 }