Exemplo n.º 1
0
 protected void OnCommandArrived(CommandEventArgs commandEventArgs)
 {
     if(CommandArrived != null)
     {
         CommandArrived(this, commandEventArgs);
     }
 }
Exemplo n.º 2
0
 private void StateController_CommandArrived(Object sender, CommandEventArgs commandEventArgs)
 {
     if(commandEventArgs.Command is IRCPingCommand)
     {
         connection.SendCommand(new IRCPongCommand(((IRCPingCommand) commandEventArgs.Command).PingParameter));
     }
     MessageForm form = state.GetWindowForConnection((Connection) sender);
     form.SendToWindow(commandEventArgs.Command.ToString());
 }
Exemplo n.º 3
0
 private void CreateServerPingCommand_CommandArrived(Object sender, CommandEventArgs commandEventArgs)
 {
     Assert.IsTrue(commandEventArgs.Command is IRCPingCommand);
     IRCPingCommand command = (IRCPingCommand) commandEventArgs.Command;
     Assert.AreEqual("ABC1234", command.PingParameter);
     lock(this)
     {
         Monitor.Pulse(this);
     }
 }
Exemplo n.º 4
0
 private void CreateNICKCommand_CommandArrived(Object sender, CommandEventArgs commandEventArgs)
 {
     Assert.AreEqual(":xpto NICK xpto2", commandEventArgs.Command.ToString());
     IRCNickCommand command = (IRCNickCommand) commandEventArgs.Command;
     Assert.AreEqual("xpto", command.Nick);
     Assert.AreEqual("xpto2", command.NewNick);
     lock(this)
     {
         Monitor.Pulse(this);
     }
 }