public static SingleLogFileAsXml Instance()
 {
     if (instance == null)
     {
         instance = new SingleLogFileAsXml();
     }
     return(instance);
 }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
 protected GlobalLog()
 {
     singleLogFileAsXml = SingleLogFileAsXml.Instance();
 }