public static void Savelog(string fileName, CLog log, List<XmlNode> trash) { XmlDocument doc; save_xml_from_class(out doc, log, log.GetView(), trash); doc.Save(fileName); doc = null; }
public void TestMethod5() { const int count = 10; Random rand = new Random(); CLog log = new CLog(); for (int i = 0; i < count; i++) { Methods.GenerateEvent(log, ref rand); log[i,-1].Date = Methods.GenerateDateTimeOffset(ref rand); } log.Add(new CTrace()); CEvent evt2=log.Events[0]; foreach (CEvent evt in log.Events) log[0].Add(evt); CView view = log.GetView(); view[0].Remove(evt2); Assert.AreEqual(log[0].Count - 1, view[0].Count); }