private void RunDll(ref string info, Task_t job, Type[] types, object[] paras) { info += "[程序集搜索路径:" + job.SearchPath + "][执行类:" + job.TypeName + "][执行方法:" + job.Method + "]"; try { Hashtable ht = MainUtil.InvokeDll(job.SearchPath, job.TypeName, job.Method, types, paras); if (!(bool)ht["Success"]) { info += "[出错]\r\n" + (ht["Data"] ?? "").ToString(); if (job.LogWhen == 0 || job.LogWhen == 2) { //失败或一定记录时 WriteLog(info); } return; } else { info += "[成功]\r\n"; if (job.LogWhen == 1 || job.LogWhen == 0) { //成功时记录 WriteLog(info); } } } catch (Exception ex) { if (job.LogWhen == 0 || job.LogWhen == 2) { //失败或一定记录时 WriteLog(info + "\r\n" + ex.ToString()); } return; } }