Esempio n. 1
0
 public SMEXMLReader(SMEProjectInformation proinfo,
                     SMESystemInformation sysinfo,
                     SMEExceptionInformation exinfo,
                     SMECallstackInformation callstackinfo)
 {
     m_xmldocument = new XDocument();
     m_rootElement = new XElement("SME");
     m_xmldocument.Add(m_rootElement);
     m_rootElement.Add(proinfo.ToXElement());
     m_rootElement.Add(sysinfo.ToXElement());
     m_rootElement.Add(exinfo.ToXElement());
     m_rootElement.Add(callstackinfo.ToXElement());
 }
Esempio n. 2
0
        public void LoadFromXML(string path)
        {
            m_xmldocument = XDocument.Load(path);
            m_rootElement = (XElement)m_xmldocument.FirstNode;
            if(m_rootElement.Name.ToString().Equals("SME"))
            {
                XElement el = (XElement)m_rootElement.FirstNode;
                ProjectInfo = new SMEProjectInformation(el);
                el = (XElement)el.NextNode;
                SystemInfo = new SMESystemInformation(el);
                el = (XElement)el.NextNode;
                ExceptionInfo = new SMEExceptionInformation(el);
                el = (XElement)el.NextNode;
                CallStackInfo = new SMECallstackInformation(el);

            }
            else
            {
                throw new Exception("SME XML 파일이 아닙니다.");
            }
        }
Esempio n. 3
0
 private string MakeQueryforCSExceptionInfo(SMEExceptionInformation exinfo, int exceptionid)
 {
     string strCommand = "INSERT INTO ExceptionInfo(EName, HResult, HelpLink, Data, CallStack, InnerExp, DumpsDump_ID) VALUES(";
     strCommand += "'" + exinfo.Name + "',";
     strCommand += "'" + exinfo.Hresult + "',";
     strCommand += "'" + exinfo.HelpLink + "',";
     strCommand += "'" + exinfo.DataToString() + "',";
     strCommand += "'" + exinfo.CallStackString + "',";
     strCommand += "'" + exceptionid + "',";
     strCommand += "'" + m_dumpid + "')";
     return strCommand;
 }
        public void LoadFromXElement(XElement xelement)
        {
            if (xelement.Name.ToString().Equals("ExeptionInformation"))
            {
                XElement el = (XElement)xelement.FirstNode;
                Name = el.Value;

                // Data
                el = (XElement)el.NextNode;
                Data = new Dictionary<string, string>();
                for (int i = 0; i < el.Elements().Count(); i++)
                {
                    XElement temp = el.Elements().ElementAt(i);
                    Data.Add(temp.Name.ToString(), temp.Value);
                }
                el = (XElement)el.NextNode;
                Hresult = int.Parse(el.Value);
                el = (XElement)el.NextNode;
                HelpLink = el.Value;
                el = (XElement)el.NextNode;
                Message = el.Value;

                el = (XElement)el.NextNode;
                m_listCallstack = new List<SMECallStack>();
                for (int i = 0; i < el.Elements().Count(); i++)
                {
                    m_listCallstack.Add(new SMECallStack(el.Elements().ElementAt(i)));
                }

                el = (XElement)el.NextNode;
                if (el.FirstNode != null)
                    InnerException = new SMEExceptionInformation((XElement)el.FirstNode);
                else
                    InnerException = null;
            }
            else
                throw new Exception("This XElement is not ExceptionInformation XElement");
        }