private void reportSentHandler(BaseCommand command, CommandReportArgs args) { Reports.Add(new CommandReport { Reporter = command, ReportType = args.ReportType, Message = args.Message }); SendReport(command, new CommandReportArgs(args.Message, args.ReportType)); }
private void _reportReceiver(BaseCommand command, CommandReportArgs e) { switch (e.ReportType) { case ReportType.Progress: appendStatusText($"{command.ShortName} => {e.Message}"); break; case ReportType.RunningCommandStatistics: setText(statusLabel, e.Message); break; default: appendStatusText($"{command.ShortName}::{e.ReportType} => {e.Message}"); break; } }
private void forwardReports(BaseCommand command, CommandReportArgs args) { SendReport(this, args); }
private void CommandsRunner_OnReportSent(BaseCommand command, CommandReportArgs args) { _reportReceiver(command, args); }
private static void onReportReceived(BaseCommand command, CommandReportArgs args) { Console.WriteLine($"{args.ReportType}: {args.Message}"); }