public PremiumQuote(XmlNode xmlNode)
        {
            XmlNodeList valueNodeList = xmlNode.SelectNodes("value");

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

            foreach (XmlNode item in valueNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valueIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(valueIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valueIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        value = new XsdTypeDecimal(item);
                    }
                }
            }


            XmlNodeList quoteBasisNodeList = xmlNode.SelectNodes("quoteBasis");

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

            foreach (XmlNode item in quoteBasisNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quoteBasisIDRef = item.Attributes["id"].Name;
                        PremiumQuoteBasisEnum ob = PremiumQuoteBasisEnum();
                        IDManager.SetID(quoteBasisIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quoteBasisIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quoteBasis = new PremiumQuoteBasisEnum(item);
                    }
                }
            }
        }
 public PremiumQuote(XmlNode xmlNode)
 {
     XmlNode valueNode = xmlNode.SelectSingleNode("value");
     
     if (valueNode != null)
     {
         if (valueNode.Attributes["href"] != null || valueNode.Attributes["id"] != null) 
         {
             if (valueNode.Attributes["id"] != null) 
             {
                 valueIDRef_ = valueNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(valueNode);
                 IDManager.SetID(valueIDRef_, ob);
             }
             else if (valueNode.Attributes["href"] != null)
             {
                 valueIDRef_ = valueNode.Attributes["href"].Value;
             }
             else
             {
                 value_ = new XsdTypeDecimal(valueNode);
             }
         }
         else
         {
             value_ = new XsdTypeDecimal(valueNode);
         }
     }
     
 
     XmlNode quoteBasisNode = xmlNode.SelectSingleNode("quoteBasis");
     
     if (quoteBasisNode != null)
     {
         if (quoteBasisNode.Attributes["href"] != null || quoteBasisNode.Attributes["id"] != null) 
         {
             if (quoteBasisNode.Attributes["id"] != null) 
             {
                 quoteBasisIDRef_ = quoteBasisNode.Attributes["id"].Value;
                 PremiumQuoteBasisEnum ob = new PremiumQuoteBasisEnum(quoteBasisNode);
                 IDManager.SetID(quoteBasisIDRef_, ob);
             }
             else if (quoteBasisNode.Attributes["href"] != null)
             {
                 quoteBasisIDRef_ = quoteBasisNode.Attributes["href"].Value;
             }
             else
             {
                 quoteBasis_ = new PremiumQuoteBasisEnum(quoteBasisNode);
             }
         }
         else
         {
             quoteBasis_ = new PremiumQuoteBasisEnum(quoteBasisNode);
         }
     }
     
 
 }
Example #3
0
        public PremiumQuote(XmlNode xmlNode)
        {
            XmlNode valueNode = xmlNode.SelectSingleNode("value");

            if (valueNode != null)
            {
                if (valueNode.Attributes["href"] != null || valueNode.Attributes["id"] != null)
                {
                    if (valueNode.Attributes["id"] != null)
                    {
                        valueIDRef_ = valueNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(valueNode);
                        IDManager.SetID(valueIDRef_, ob);
                    }
                    else if (valueNode.Attributes["href"] != null)
                    {
                        valueIDRef_ = valueNode.Attributes["href"].Value;
                    }
                    else
                    {
                        value_ = new XsdTypeDecimal(valueNode);
                    }
                }
                else
                {
                    value_ = new XsdTypeDecimal(valueNode);
                }
            }


            XmlNode quoteBasisNode = xmlNode.SelectSingleNode("quoteBasis");

            if (quoteBasisNode != null)
            {
                if (quoteBasisNode.Attributes["href"] != null || quoteBasisNode.Attributes["id"] != null)
                {
                    if (quoteBasisNode.Attributes["id"] != null)
                    {
                        quoteBasisIDRef_ = quoteBasisNode.Attributes["id"].Value;
                        PremiumQuoteBasisEnum ob = new PremiumQuoteBasisEnum(quoteBasisNode);
                        IDManager.SetID(quoteBasisIDRef_, ob);
                    }
                    else if (quoteBasisNode.Attributes["href"] != null)
                    {
                        quoteBasisIDRef_ = quoteBasisNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quoteBasis_ = new PremiumQuoteBasisEnum(quoteBasisNode);
                    }
                }
                else
                {
                    quoteBasis_ = new PremiumQuoteBasisEnum(quoteBasisNode);
                }
            }
        }