public static SingleLogFileAsXml Instance() { if (instance == null) { instance = new SingleLogFileAsXml(); } return(instance); }
public List <string> GetLogListSender() { TestXmlLog log; List <string> listSender = new List <string>(); if ((log = SingleLogFileAsXml.Instance().GetLogInXml()) != null) { if (log.listXmlLineLog != null) { listSender = log.listXmlLineLog.Select(c => c.Sender).Distinct().ToList(); } } return(listSender); }
public List <string> GetLogFromSender(string Sender) { TestXmlLog log; List <string> listLog = new List <string>(); if ((log = SingleLogFileAsXml.Instance().GetLogInXml()) != null) { if (log.listXmlLineLog != null) { var q = log.listXmlLineLog.Where(c => c.Sender == Sender).ToList(); if (q != null) { foreach (var v in q) { listLog.Add(v.dt.ToLongDateString() + " " + v.dt.ToLongTimeString() + " " + v.message); } } } } return(listLog); }
protected GlobalLog() { singleLogFileAsXml = SingleLogFileAsXml.Instance(); }