示例#1
0
        public Exception(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode headerNode = xmlNode.SelectSingleNode("header");

            if (headerNode != null)
            {
                if (headerNode.Attributes["href"] != null || headerNode.Attributes["id"] != null)
                {
                    if (headerNode.Attributes["id"] != null)
                    {
                        headerIDRef_ = headerNode.Attributes["id"].Value;
                        ExceptionMessageHeader ob = new ExceptionMessageHeader(headerNode);
                        IDManager.SetID(headerIDRef_, ob);
                    }
                    else if (headerNode.Attributes["href"] != null)
                    {
                        headerIDRef_ = headerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        header_ = new ExceptionMessageHeader(headerNode);
                    }
                }
                else
                {
                    header_ = new ExceptionMessageHeader(headerNode);
                }
            }


            XmlNodeList validationNodeList = xmlNode.SelectNodes("validation");

            if (validationNodeList != null)
            {
                this.validation_ = new List <Validation>();
                foreach (XmlNode item in validationNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            validationIDRef_ = item.Attributes["id"].Value;
                            validation_.Add(new Validation(item));
                            IDManager.SetID(validationIDRef_, validation_[validation_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            validationIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            validation_.Add(new Validation(item));
                        }
                    }
                    else
                    {
                        validation_.Add(new Validation(item));
                    }
                }
            }


            XmlNode parentCorrelationIdNode = xmlNode.SelectSingleNode("parentCorrelationId");

            if (parentCorrelationIdNode != null)
            {
                if (parentCorrelationIdNode.Attributes["href"] != null || parentCorrelationIdNode.Attributes["id"] != null)
                {
                    if (parentCorrelationIdNode.Attributes["id"] != null)
                    {
                        parentCorrelationIdIDRef_ = parentCorrelationIdNode.Attributes["id"].Value;
                        CorrelationId ob = new CorrelationId(parentCorrelationIdNode);
                        IDManager.SetID(parentCorrelationIdIDRef_, ob);
                    }
                    else if (parentCorrelationIdNode.Attributes["href"] != null)
                    {
                        parentCorrelationIdIDRef_ = parentCorrelationIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        parentCorrelationId_ = new CorrelationId(parentCorrelationIdNode);
                    }
                }
                else
                {
                    parentCorrelationId_ = new CorrelationId(parentCorrelationIdNode);
                }
            }


            XmlNode correlationIdNode = xmlNode.SelectSingleNode("correlationId");

            if (correlationIdNode != null)
            {
                if (correlationIdNode.Attributes["href"] != null || correlationIdNode.Attributes["id"] != null)
                {
                    if (correlationIdNode.Attributes["id"] != null)
                    {
                        correlationIdIDRef_ = correlationIdNode.Attributes["id"].Value;
                        CorrelationId ob = new CorrelationId(correlationIdNode);
                        IDManager.SetID(correlationIdIDRef_, ob);
                    }
                    else if (correlationIdNode.Attributes["href"] != null)
                    {
                        correlationIdIDRef_ = correlationIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        correlationId_ = new CorrelationId(correlationIdNode);
                    }
                }
                else
                {
                    correlationId_ = new CorrelationId(correlationIdNode);
                }
            }


            XmlNode sequenceNumberNode = xmlNode.SelectSingleNode("sequenceNumber");

            if (sequenceNumberNode != null)
            {
                if (sequenceNumberNode.Attributes["href"] != null || sequenceNumberNode.Attributes["id"] != null)
                {
                    if (sequenceNumberNode.Attributes["id"] != null)
                    {
                        sequenceNumberIDRef_ = sequenceNumberNode.Attributes["id"].Value;
                        XsdTypePositiveInteger ob = new XsdTypePositiveInteger(sequenceNumberNode);
                        IDManager.SetID(sequenceNumberIDRef_, ob);
                    }
                    else if (sequenceNumberNode.Attributes["href"] != null)
                    {
                        sequenceNumberIDRef_ = sequenceNumberNode.Attributes["href"].Value;
                    }
                    else
                    {
                        sequenceNumber_ = new XsdTypePositiveInteger(sequenceNumberNode);
                    }
                }
                else
                {
                    sequenceNumber_ = new XsdTypePositiveInteger(sequenceNumberNode);
                }
            }


            XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason");

            if (reasonNodeList != null)
            {
                this.reason_ = new List <Reason>();
                foreach (XmlNode item in reasonNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            reasonIDRef_ = item.Attributes["id"].Value;
                            reason_.Add(new Reason(item));
                            IDManager.SetID(reasonIDRef_, reason_[reason_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            reasonIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            reason_.Add(new Reason(item));
                        }
                    }
                    else
                    {
                        reason_.Add(new Reason(item));
                    }
                }
            }


            XmlNode additionalDataNode = xmlNode.SelectSingleNode("additionalData");

            if (additionalDataNode != null)
            {
                if (additionalDataNode.Attributes["href"] != null || additionalDataNode.Attributes["id"] != null)
                {
                    if (additionalDataNode.Attributes["id"] != null)
                    {
                        additionalDataIDRef_ = additionalDataNode.Attributes["id"].Value;
                        AdditionalData ob = new AdditionalData(additionalDataNode);
                        IDManager.SetID(additionalDataIDRef_, ob);
                    }
                    else if (additionalDataNode.Attributes["href"] != null)
                    {
                        additionalDataIDRef_ = additionalDataNode.Attributes["href"].Value;
                    }
                    else
                    {
                        additionalData_ = new AdditionalData(additionalDataNode);
                    }
                }
                else
                {
                    additionalData_ = new AdditionalData(additionalDataNode);
                }
            }
        }
        public Exception(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList headerNodeList = xmlNode.SelectNodes("header");

            if (headerNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in headerNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        headerIDRef = item.Attributes["id"].Name;
                        ExceptionMessageHeader ob = ExceptionMessageHeader();
                        IDManager.SetID(headerIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        headerIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        header = new ExceptionMessageHeader(item);
                    }
                }
            }


            XmlNodeList validationNodeList = xmlNode.SelectNodes("validation");

            foreach (XmlNode item in validationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        validationIDRef = item.Attributes["id"].Name;
                        List <Validation> ob = new List <Validation>();
                        ob.Add(new Validation(item));
                        IDManager.SetID(validationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        validationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        validation.Add(new Validation(item));
                    }
                }
            }


            XmlNodeList parentCorrelationIdNodeList = xmlNode.SelectNodes("parentCorrelationId");

            if (parentCorrelationIdNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in parentCorrelationIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        parentCorrelationIdIDRef = item.Attributes["id"].Name;
                        CorrelationId ob = CorrelationId();
                        IDManager.SetID(parentCorrelationIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        parentCorrelationIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        parentCorrelationId = new CorrelationId(item);
                    }
                }
            }


            XmlNodeList correlationIdNodeList = xmlNode.SelectNodes("correlationId");

            if (correlationIdNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in correlationIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        correlationIdIDRef = item.Attributes["id"].Name;
                        CorrelationId ob = CorrelationId();
                        IDManager.SetID(correlationIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        correlationIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        correlationId = new CorrelationId(item);
                    }
                }
            }


            XmlNodeList sequenceNumberNodeList = xmlNode.SelectNodes("sequenceNumber");

            if (sequenceNumberNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in sequenceNumberNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sequenceNumberIDRef = item.Attributes["id"].Name;
                        XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                        IDManager.SetID(sequenceNumberIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sequenceNumberIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        sequenceNumber = new XsdTypePositiveInteger(item);
                    }
                }
            }


            XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason");

            foreach (XmlNode item in reasonNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        reasonIDRef = item.Attributes["id"].Name;
                        List <Reason> ob = new List <Reason>();
                        ob.Add(new Reason(item));
                        IDManager.SetID(reasonIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        reasonIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        reason.Add(new Reason(item));
                    }
                }
            }


            XmlNodeList additionalDataNodeList = xmlNode.SelectNodes("additionalData");

            if (additionalDataNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in additionalDataNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        additionalDataIDRef = item.Attributes["id"].Name;
                        AdditionalData ob = AdditionalData();
                        IDManager.SetID(additionalDataIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        additionalDataIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        additionalData = new AdditionalData(item);
                    }
                }
            }
        }
 public Exception(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList headerNodeList = xmlNode.SelectNodes("header");
     if (headerNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in headerNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 headerIDRef = item.Attributes["id"].Name;
                 ExceptionMessageHeader ob = ExceptionMessageHeader();
                 IDManager.SetID(headerIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 headerIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 header = new ExceptionMessageHeader(item);
             }
         }
     }
     
 
     XmlNodeList validationNodeList = xmlNode.SelectNodes("validation");
     
     foreach (XmlNode item in validationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 validationIDRef = item.Attributes["id"].Name;
                 List<Validation> ob = new List<Validation>();
                 ob.Add(new Validation(item));
                 IDManager.SetID(validationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 validationIDRef = item.Attributes["href"].Name;
             }
             else
             {
             validation.Add(new Validation(item));
             }
         }
     }
     
 
     XmlNodeList parentCorrelationIdNodeList = xmlNode.SelectNodes("parentCorrelationId");
     if (parentCorrelationIdNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in parentCorrelationIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 parentCorrelationIdIDRef = item.Attributes["id"].Name;
                 CorrelationId ob = CorrelationId();
                 IDManager.SetID(parentCorrelationIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 parentCorrelationIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 parentCorrelationId = new CorrelationId(item);
             }
         }
     }
     
 
     XmlNodeList correlationIdNodeList = xmlNode.SelectNodes("correlationId");
     if (correlationIdNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in correlationIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 correlationIdIDRef = item.Attributes["id"].Name;
                 CorrelationId ob = CorrelationId();
                 IDManager.SetID(correlationIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 correlationIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 correlationId = new CorrelationId(item);
             }
         }
     }
     
 
     XmlNodeList sequenceNumberNodeList = xmlNode.SelectNodes("sequenceNumber");
     if (sequenceNumberNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sequenceNumberNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sequenceNumberIDRef = item.Attributes["id"].Name;
                 XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                 IDManager.SetID(sequenceNumberIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sequenceNumberIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sequenceNumber = new XsdTypePositiveInteger(item);
             }
         }
     }
     
 
     XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason");
     
     foreach (XmlNode item in reasonNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 reasonIDRef = item.Attributes["id"].Name;
                 List<Reason> ob = new List<Reason>();
                 ob.Add(new Reason(item));
                 IDManager.SetID(reasonIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 reasonIDRef = item.Attributes["href"].Name;
             }
             else
             {
             reason.Add(new Reason(item));
             }
         }
     }
     
 
     XmlNodeList additionalDataNodeList = xmlNode.SelectNodes("additionalData");
     if (additionalDataNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in additionalDataNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 additionalDataIDRef = item.Attributes["id"].Name;
                 AdditionalData ob = AdditionalData();
                 IDManager.SetID(additionalDataIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 additionalDataIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 additionalData = new AdditionalData(item);
             }
         }
     }
     
 
 }
 public Exception(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode headerNode = xmlNode.SelectSingleNode("header");
     
     if (headerNode != null)
     {
         if (headerNode.Attributes["href"] != null || headerNode.Attributes["id"] != null) 
         {
             if (headerNode.Attributes["id"] != null) 
             {
                 headerIDRef_ = headerNode.Attributes["id"].Value;
                 ExceptionMessageHeader ob = new ExceptionMessageHeader(headerNode);
                 IDManager.SetID(headerIDRef_, ob);
             }
             else if (headerNode.Attributes["href"] != null)
             {
                 headerIDRef_ = headerNode.Attributes["href"].Value;
             }
             else
             {
                 header_ = new ExceptionMessageHeader(headerNode);
             }
         }
         else
         {
             header_ = new ExceptionMessageHeader(headerNode);
         }
     }
     
 
     XmlNodeList validationNodeList = xmlNode.SelectNodes("validation");
     
     if (validationNodeList != null)
     {
         this.validation_ = new List<Validation>();
         foreach (XmlNode item in validationNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     validationIDRef_ = item.Attributes["id"].Value;
                     validation_.Add(new Validation(item));
                     IDManager.SetID(validationIDRef_, validation_[validation_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     validationIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 validation_.Add(new Validation(item));
                 }
             }
             else
             {
                 validation_.Add(new Validation(item));
             }
         }
     }
     
 
     XmlNode parentCorrelationIdNode = xmlNode.SelectSingleNode("parentCorrelationId");
     
     if (parentCorrelationIdNode != null)
     {
         if (parentCorrelationIdNode.Attributes["href"] != null || parentCorrelationIdNode.Attributes["id"] != null) 
         {
             if (parentCorrelationIdNode.Attributes["id"] != null) 
             {
                 parentCorrelationIdIDRef_ = parentCorrelationIdNode.Attributes["id"].Value;
                 CorrelationId ob = new CorrelationId(parentCorrelationIdNode);
                 IDManager.SetID(parentCorrelationIdIDRef_, ob);
             }
             else if (parentCorrelationIdNode.Attributes["href"] != null)
             {
                 parentCorrelationIdIDRef_ = parentCorrelationIdNode.Attributes["href"].Value;
             }
             else
             {
                 parentCorrelationId_ = new CorrelationId(parentCorrelationIdNode);
             }
         }
         else
         {
             parentCorrelationId_ = new CorrelationId(parentCorrelationIdNode);
         }
     }
     
 
     XmlNode correlationIdNode = xmlNode.SelectSingleNode("correlationId");
     
     if (correlationIdNode != null)
     {
         if (correlationIdNode.Attributes["href"] != null || correlationIdNode.Attributes["id"] != null) 
         {
             if (correlationIdNode.Attributes["id"] != null) 
             {
                 correlationIdIDRef_ = correlationIdNode.Attributes["id"].Value;
                 CorrelationId ob = new CorrelationId(correlationIdNode);
                 IDManager.SetID(correlationIdIDRef_, ob);
             }
             else if (correlationIdNode.Attributes["href"] != null)
             {
                 correlationIdIDRef_ = correlationIdNode.Attributes["href"].Value;
             }
             else
             {
                 correlationId_ = new CorrelationId(correlationIdNode);
             }
         }
         else
         {
             correlationId_ = new CorrelationId(correlationIdNode);
         }
     }
     
 
     XmlNode sequenceNumberNode = xmlNode.SelectSingleNode("sequenceNumber");
     
     if (sequenceNumberNode != null)
     {
         if (sequenceNumberNode.Attributes["href"] != null || sequenceNumberNode.Attributes["id"] != null) 
         {
             if (sequenceNumberNode.Attributes["id"] != null) 
             {
                 sequenceNumberIDRef_ = sequenceNumberNode.Attributes["id"].Value;
                 XsdTypePositiveInteger ob = new XsdTypePositiveInteger(sequenceNumberNode);
                 IDManager.SetID(sequenceNumberIDRef_, ob);
             }
             else if (sequenceNumberNode.Attributes["href"] != null)
             {
                 sequenceNumberIDRef_ = sequenceNumberNode.Attributes["href"].Value;
             }
             else
             {
                 sequenceNumber_ = new XsdTypePositiveInteger(sequenceNumberNode);
             }
         }
         else
         {
             sequenceNumber_ = new XsdTypePositiveInteger(sequenceNumberNode);
         }
     }
     
 
     XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason");
     
     if (reasonNodeList != null)
     {
         this.reason_ = new List<Reason>();
         foreach (XmlNode item in reasonNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     reasonIDRef_ = item.Attributes["id"].Value;
                     reason_.Add(new Reason(item));
                     IDManager.SetID(reasonIDRef_, reason_[reason_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     reasonIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 reason_.Add(new Reason(item));
                 }
             }
             else
             {
                 reason_.Add(new Reason(item));
             }
         }
     }
     
 
     XmlNode additionalDataNode = xmlNode.SelectSingleNode("additionalData");
     
     if (additionalDataNode != null)
     {
         if (additionalDataNode.Attributes["href"] != null || additionalDataNode.Attributes["id"] != null) 
         {
             if (additionalDataNode.Attributes["id"] != null) 
             {
                 additionalDataIDRef_ = additionalDataNode.Attributes["id"].Value;
                 AdditionalData ob = new AdditionalData(additionalDataNode);
                 IDManager.SetID(additionalDataIDRef_, ob);
             }
             else if (additionalDataNode.Attributes["href"] != null)
             {
                 additionalDataIDRef_ = additionalDataNode.Attributes["href"].Value;
             }
             else
             {
                 additionalData_ = new AdditionalData(additionalDataNode);
             }
         }
         else
         {
             additionalData_ = new AdditionalData(additionalDataNode);
         }
     }
     
 
 }