//檢查更新後內容 //是否都是成功 private bool ReNewTask() { bool Succeed = false; Dictionary <string, BitTask> dic = new Dictionary <string, BitTask>(); foreach (string each in RunnerDic.Keys) { BitTask bt = RunnerDic[each]; if (!bt.envelope.BodyContent.XmlString.Contains("Succeed")) { dic.Add(each, bt); } else { Succeed = true; } } RunnerDic = dic; return(Succeed); }
//執行更新作業 private void TestAddTask(MultiTaskingRunner_up runner, ConnectionHelper conn, string udmName) { string name = SchoolPanel.GlobalSchoolCache[conn.UID].Title; BitTask bt = new BitTask(); bt.conn = conn; bt.udmName = udmName; runner.AddTask(string.Format("{0}({1})", name, conn.UID), (x) => { object[] obj = x as object[]; ConnectionHelper c = obj[0] as ConnectionHelper; string xurl = (string)obj[1]; Envelope el = UpdateUDM(c, xurl); bt.envelope = el; if (!RunnerDic.ContainsKey(c.TargetDSNS)) { RunnerDic.Add(c.TargetDSNS, bt); } }, new object[] { conn, udmName }, new System.Threading.CancellationTokenSource()); }