public T RemoteExec <T>(string fx, object args, T defRet) { try { if (clientPipe == null && !Connect()) { throw new Exception("Connection Failed"); } return((T)(clientPipe.RemoteExec(fx, args))); } catch (Exception err) { AppLog.Line("Error in {0}: {1}", MiscFunc.GetCurrentMethod(), err.Message); return(defRet); } }
public T RemoteExec <T>(string fx, object args, T defRet) { T ret; try { if (clientPipe == null && Connect(3000, true) == 0) { throw new Exception("Connection Failed"); } ret = (T)(clientPipe.RemoteExec(fx, args)); } catch (Exception err) { AppLog.Exception(err); ret = defRet; } return(ret); }
public List <byte[]> RemoteExec(string func, List <byte[]> args) { List <byte[]> ret = null; #if !DEBUG try #endif { if (clientPipe == null) // && Connect(3000, true) == 0) { throw new Exception("Not Connected"); } ret = clientPipe.RemoteExec(func, args); } #if !DEBUG catch (Exception err) { AppLog.Exception(err); } #endif return(ret); }