Esempio n. 1
0
        public CorrelationLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList amountNodeList = xmlNode.SelectNodes("amount");

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

            foreach (XmlNode item in amountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        amountIDRef = item.Attributes["id"].Name;
                        CorrelationAmount ob = CorrelationAmount();
                        IDManager.SetID(amountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        amountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        amount = new CorrelationAmount(item);
                    }
                }
            }
        }
        public CorrelationLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode amountNode = xmlNode.SelectSingleNode("amount");

            if (amountNode != null)
            {
                if (amountNode.Attributes["href"] != null || amountNode.Attributes["id"] != null)
                {
                    if (amountNode.Attributes["id"] != null)
                    {
                        amountIDRef_ = amountNode.Attributes["id"].Value;
                        CorrelationAmount ob = new CorrelationAmount(amountNode);
                        IDManager.SetID(amountIDRef_, ob);
                    }
                    else if (amountNode.Attributes["href"] != null)
                    {
                        amountIDRef_ = amountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        amount_ = new CorrelationAmount(amountNode);
                    }
                }
                else
                {
                    amount_ = new CorrelationAmount(amountNode);
                }
            }
        }
 public CorrelationLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList amountNodeList = xmlNode.SelectNodes("amount");
     if (amountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in amountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 amountIDRef = item.Attributes["id"].Name;
                 CorrelationAmount ob = CorrelationAmount();
                 IDManager.SetID(amountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 amountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 amount = new CorrelationAmount(item);
             }
         }
     }
     
 
 }
 public CorrelationLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode amountNode = xmlNode.SelectSingleNode("amount");
     
     if (amountNode != null)
     {
         if (amountNode.Attributes["href"] != null || amountNode.Attributes["id"] != null) 
         {
             if (amountNode.Attributes["id"] != null) 
             {
                 amountIDRef_ = amountNode.Attributes["id"].Value;
                 CorrelationAmount ob = new CorrelationAmount(amountNode);
                 IDManager.SetID(amountIDRef_, ob);
             }
             else if (amountNode.Attributes["href"] != null)
             {
                 amountIDRef_ = amountNode.Attributes["href"].Value;
             }
             else
             {
                 amount_ = new CorrelationAmount(amountNode);
             }
         }
         else
         {
             amount_ = new CorrelationAmount(amountNode);
         }
     }
     
 
 }