protected virtual void OnCommandIssued(CommandIssuedEventArgs eventArgs) { if (CommandIssued != null) { CommandIssued(this, eventArgs); } }
public void Issue(Command command) { var eventArgs = new CommandIssuedEventArgs { Command = command, DateIssued = DateTime.Now, Issuer = this }; OnCommandIssued(eventArgs); }
public static void issuer_onCommandIssued(object sender, CommandIssuedEventArgs eventArgs) { processor = new Processor(); Processor.CommandReceived += _processor_OnCommandReceived; Task.Run(async() => { await processor.Process(eventArgs.Command); }); Console.WriteLine($" {eventArgs.Issuer.GetType()} --issued command \"{eventArgs.Command.Name}\"; \n--issued by {sender}"); Console.WriteLine(); }
private void BackupDevice_CommandIssued(object sender, CommandIssuedEventArgs e) { Console.WriteLine(e.Command); }
void client_CommandIssued(object sender, CommandIssuedEventArgs args) { AppendText( string.Format("Client issued '{0}' command {1} The response was {2}", args.Command.ToString(), Environment.NewLine, args.Command.Response)); }
static void client_CommandIssued(object sender, CommandIssuedEventArgs args) { System.Console.WriteLine(args.Command.Response); }