public Tuple <bool, string, string> AC(EDDDLLCaller caller, string cmd, string[] paras) { string r = caller.ActionCommand(cmd, paras); if (r == null) { return(new Tuple <bool, string, string>(false, caller.Name, "DLL does not implement ActionCommand")); } else if (r.Length > 0 && r[0] == '+') { return(new Tuple <bool, string, string>(true, caller.Name, r.Mid(1))); } else { return(new Tuple <bool, string, string>(false, caller.Name, r.Mid(1))); } }
// NULL/False if no DLL found, or <string,true> if DLL found, string may be null if DLL does not implement action command public Tuple <string, bool> ActionCommand(string dllname, string cmd, string[] paras) { if (dllname.Equals("All", StringComparison.InvariantCultureIgnoreCase)) { string ret = ""; foreach (EDDDLLCaller caller in dlls) { string r = caller.ActionCommand(cmd, paras); if (r != null) { ret += r + ";"; } } return(new Tuple <string, bool>(ret, true)); } else { EDDDLLCaller caller = FindCaller(dllname); return(caller != null ? new Tuple <string, bool>(caller.ActionCommand(cmd, paras), true) : new Tuple <string, bool>(null, false)); } }