static void Main(string[] args) { MyServer server = new MyServer(); MyClient client = new MyClient(server); server.MaliciousAlarm += client.RaiseInvalidCommand; client.ExecuteCommand("Nothing happends"); client.ExecuteCommand("-truncate Something happend"); Console.ReadKey(); }
public MyClient(MyServer server) { this.server = server; }