コード例 #1
0
        public void Run()
        {
            var startArgs = new ReportEventStartArgs(Name);

            OnCommandStart?.Invoke(this, startArgs);
            Execute();
            var endArgs = new ReportEventEndArgs(Name, Contribution);

            OnCommandEnd?.Invoke(this, endArgs);
        }
コード例 #2
0
 private void OnCommandEnd(object sender, ReportEventEndArgs e)
 {
     Progress += e.Contribution;
     Console.WriteLine($"Done {e.Name}. {Progress}%");
 }