Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
        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);
 }
Ejemplo n.º 5
0
 private static void onReportReceived(BaseCommand command, CommandReportArgs args)
 {
     Console.WriteLine($"{args.ReportType}: {args.Message}");
 }