public static bool Fail(string URL) { try { IDataServer dataServer = (IDataServer)Activator.GetObject(typeof(IDataServer), URL); dataServer.Fail(); return(true); } catch (RemotingException e) { //TODO: Improve the catch String text = "[Fail] " + e; Console.WriteLine(text); //textBox.Invoke(new ClearTextDel(textBox.Clear)); //textBox.Invoke(new UpdateTextDel(textBox.AppendText), new object[] { text }); return(false); } }
public object execute(IDataServer data, string command) { if (data != null) { data.Fail(); } return null; }