public EquityDerivativeShortFormBase(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList strikeNodeList = xmlNode.SelectNodes("strike");
     if (strikeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in strikeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 strikeIDRef = item.Attributes["id"].Name;
                 EquityStrike ob = EquityStrike();
                 IDManager.SetID(strikeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 strikeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 strike = new EquityStrike(item);
             }
         }
     }
     
 
     XmlNodeList spotPriceNodeList = xmlNode.SelectNodes("spotPrice");
     if (spotPriceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in spotPriceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 spotPriceIDRef = item.Attributes["id"].Name;
                 NonNegativeDecimal ob = NonNegativeDecimal();
                 IDManager.SetID(spotPriceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 spotPriceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 spotPrice = new NonNegativeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList numberOfOptionsNodeList = xmlNode.SelectNodes("numberOfOptions");
     if (numberOfOptionsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in numberOfOptionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 numberOfOptionsIDRef = item.Attributes["id"].Name;
                 NonNegativeDecimal ob = NonNegativeDecimal();
                 IDManager.SetID(numberOfOptionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 numberOfOptionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 numberOfOptions = new NonNegativeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList equityPremiumNodeList = xmlNode.SelectNodes("equityPremium");
     if (equityPremiumNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityPremiumNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityPremiumIDRef = item.Attributes["id"].Name;
                 EquityPremium ob = EquityPremium();
                 IDManager.SetID(equityPremiumIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityPremiumIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityPremium = new EquityPremium(item);
             }
         }
     }
     
 
 }
        public EquityDerivativeShortFormBase(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList strikeNodeList = xmlNode.SelectNodes("strike");

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

            foreach (XmlNode item in strikeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        strikeIDRef = item.Attributes["id"].Name;
                        EquityStrike ob = EquityStrike();
                        IDManager.SetID(strikeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        strikeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        strike = new EquityStrike(item);
                    }
                }
            }


            XmlNodeList spotPriceNodeList = xmlNode.SelectNodes("spotPrice");

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

            foreach (XmlNode item in spotPriceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        spotPriceIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(spotPriceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        spotPriceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        spotPrice = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList numberOfOptionsNodeList = xmlNode.SelectNodes("numberOfOptions");

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

            foreach (XmlNode item in numberOfOptionsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        numberOfOptionsIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(numberOfOptionsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        numberOfOptionsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        numberOfOptions = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList equityPremiumNodeList = xmlNode.SelectNodes("equityPremium");

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

            foreach (XmlNode item in equityPremiumNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        equityPremiumIDRef = item.Attributes["id"].Name;
                        EquityPremium ob = EquityPremium();
                        IDManager.SetID(equityPremiumIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        equityPremiumIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        equityPremium = new EquityPremium(item);
                    }
                }
            }
        }
 public EquityOption(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode strikeNode = xmlNode.SelectSingleNode("strike");
     
     if (strikeNode != null)
     {
         if (strikeNode.Attributes["href"] != null || strikeNode.Attributes["id"] != null) 
         {
             if (strikeNode.Attributes["id"] != null) 
             {
                 strikeIDRef_ = strikeNode.Attributes["id"].Value;
                 EquityStrike ob = new EquityStrike(strikeNode);
                 IDManager.SetID(strikeIDRef_, ob);
             }
             else if (strikeNode.Attributes["href"] != null)
             {
                 strikeIDRef_ = strikeNode.Attributes["href"].Value;
             }
             else
             {
                 strike_ = new EquityStrike(strikeNode);
             }
         }
         else
         {
             strike_ = new EquityStrike(strikeNode);
         }
     }
     
 
     XmlNode spotPriceNode = xmlNode.SelectSingleNode("spotPrice");
     
     if (spotPriceNode != null)
     {
         if (spotPriceNode.Attributes["href"] != null || spotPriceNode.Attributes["id"] != null) 
         {
             if (spotPriceNode.Attributes["id"] != null) 
             {
                 spotPriceIDRef_ = spotPriceNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(spotPriceNode);
                 IDManager.SetID(spotPriceIDRef_, ob);
             }
             else if (spotPriceNode.Attributes["href"] != null)
             {
                 spotPriceIDRef_ = spotPriceNode.Attributes["href"].Value;
             }
             else
             {
                 spotPrice_ = new NonNegativeDecimal(spotPriceNode);
             }
         }
         else
         {
             spotPrice_ = new NonNegativeDecimal(spotPriceNode);
         }
     }
     
 
     XmlNode numberOfOptionsNode = xmlNode.SelectSingleNode("numberOfOptions");
     
     if (numberOfOptionsNode != null)
     {
         if (numberOfOptionsNode.Attributes["href"] != null || numberOfOptionsNode.Attributes["id"] != null) 
         {
             if (numberOfOptionsNode.Attributes["id"] != null) 
             {
                 numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(numberOfOptionsNode);
                 IDManager.SetID(numberOfOptionsIDRef_, ob);
             }
             else if (numberOfOptionsNode.Attributes["href"] != null)
             {
                 numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 numberOfOptions_ = new NonNegativeDecimal(numberOfOptionsNode);
             }
         }
         else
         {
             numberOfOptions_ = new NonNegativeDecimal(numberOfOptionsNode);
         }
     }
     
 
     XmlNode optionEntitlementNode = xmlNode.SelectSingleNode("optionEntitlement");
     
     if (optionEntitlementNode != null)
     {
         if (optionEntitlementNode.Attributes["href"] != null || optionEntitlementNode.Attributes["id"] != null) 
         {
             if (optionEntitlementNode.Attributes["id"] != null) 
             {
                 optionEntitlementIDRef_ = optionEntitlementNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(optionEntitlementNode);
                 IDManager.SetID(optionEntitlementIDRef_, ob);
             }
             else if (optionEntitlementNode.Attributes["href"] != null)
             {
                 optionEntitlementIDRef_ = optionEntitlementNode.Attributes["href"].Value;
             }
             else
             {
                 optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
             }
         }
         else
         {
             optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
         }
     }
     
 
     XmlNode equityPremiumNode = xmlNode.SelectSingleNode("equityPremium");
     
     if (equityPremiumNode != null)
     {
         if (equityPremiumNode.Attributes["href"] != null || equityPremiumNode.Attributes["id"] != null) 
         {
             if (equityPremiumNode.Attributes["id"] != null) 
             {
                 equityPremiumIDRef_ = equityPremiumNode.Attributes["id"].Value;
                 EquityPremium ob = new EquityPremium(equityPremiumNode);
                 IDManager.SetID(equityPremiumIDRef_, ob);
             }
             else if (equityPremiumNode.Attributes["href"] != null)
             {
                 equityPremiumIDRef_ = equityPremiumNode.Attributes["href"].Value;
             }
             else
             {
                 equityPremium_ = new EquityPremium(equityPremiumNode);
             }
         }
         else
         {
             equityPremium_ = new EquityPremium(equityPremiumNode);
         }
     }
     
 
 }
        public EquityOption(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode strikeNode = xmlNode.SelectSingleNode("strike");

            if (strikeNode != null)
            {
                if (strikeNode.Attributes["href"] != null || strikeNode.Attributes["id"] != null)
                {
                    if (strikeNode.Attributes["id"] != null)
                    {
                        strikeIDRef_ = strikeNode.Attributes["id"].Value;
                        EquityStrike ob = new EquityStrike(strikeNode);
                        IDManager.SetID(strikeIDRef_, ob);
                    }
                    else if (strikeNode.Attributes["href"] != null)
                    {
                        strikeIDRef_ = strikeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        strike_ = new EquityStrike(strikeNode);
                    }
                }
                else
                {
                    strike_ = new EquityStrike(strikeNode);
                }
            }


            XmlNode spotPriceNode = xmlNode.SelectSingleNode("spotPrice");

            if (spotPriceNode != null)
            {
                if (spotPriceNode.Attributes["href"] != null || spotPriceNode.Attributes["id"] != null)
                {
                    if (spotPriceNode.Attributes["id"] != null)
                    {
                        spotPriceIDRef_ = spotPriceNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(spotPriceNode);
                        IDManager.SetID(spotPriceIDRef_, ob);
                    }
                    else if (spotPriceNode.Attributes["href"] != null)
                    {
                        spotPriceIDRef_ = spotPriceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        spotPrice_ = new NonNegativeDecimal(spotPriceNode);
                    }
                }
                else
                {
                    spotPrice_ = new NonNegativeDecimal(spotPriceNode);
                }
            }


            XmlNode numberOfOptionsNode = xmlNode.SelectSingleNode("numberOfOptions");

            if (numberOfOptionsNode != null)
            {
                if (numberOfOptionsNode.Attributes["href"] != null || numberOfOptionsNode.Attributes["id"] != null)
                {
                    if (numberOfOptionsNode.Attributes["id"] != null)
                    {
                        numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(numberOfOptionsNode);
                        IDManager.SetID(numberOfOptionsIDRef_, ob);
                    }
                    else if (numberOfOptionsNode.Attributes["href"] != null)
                    {
                        numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        numberOfOptions_ = new NonNegativeDecimal(numberOfOptionsNode);
                    }
                }
                else
                {
                    numberOfOptions_ = new NonNegativeDecimal(numberOfOptionsNode);
                }
            }


            XmlNode optionEntitlementNode = xmlNode.SelectSingleNode("optionEntitlement");

            if (optionEntitlementNode != null)
            {
                if (optionEntitlementNode.Attributes["href"] != null || optionEntitlementNode.Attributes["id"] != null)
                {
                    if (optionEntitlementNode.Attributes["id"] != null)
                    {
                        optionEntitlementIDRef_ = optionEntitlementNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(optionEntitlementNode);
                        IDManager.SetID(optionEntitlementIDRef_, ob);
                    }
                    else if (optionEntitlementNode.Attributes["href"] != null)
                    {
                        optionEntitlementIDRef_ = optionEntitlementNode.Attributes["href"].Value;
                    }
                    else
                    {
                        optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
                    }
                }
                else
                {
                    optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
                }
            }


            XmlNode equityPremiumNode = xmlNode.SelectSingleNode("equityPremium");

            if (equityPremiumNode != null)
            {
                if (equityPremiumNode.Attributes["href"] != null || equityPremiumNode.Attributes["id"] != null)
                {
                    if (equityPremiumNode.Attributes["id"] != null)
                    {
                        equityPremiumIDRef_ = equityPremiumNode.Attributes["id"].Value;
                        EquityPremium ob = new EquityPremium(equityPremiumNode);
                        IDManager.SetID(equityPremiumIDRef_, ob);
                    }
                    else if (equityPremiumNode.Attributes["href"] != null)
                    {
                        equityPremiumIDRef_ = equityPremiumNode.Attributes["href"].Value;
                    }
                    else
                    {
                        equityPremium_ = new EquityPremium(equityPremiumNode);
                    }
                }
                else
                {
                    equityPremium_ = new EquityPremium(equityPremiumNode);
                }
            }
        }