public FixedBondInstrument(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode bondInformationNode = xmlNode.SelectSingleNode("bondInformation");
     
     if (bondInformationNode != null)
     {
         if (bondInformationNode.Attributes["href"] != null || bondInformationNode.Attributes["id"] != null) 
         {
             if (bondInformationNode.Attributes["id"] != null) 
             {
                 bondInformationIDRef_ = bondInformationNode.Attributes["id"].Value;
                 BondInformation ob = new BondInformation(bondInformationNode);
                 IDManager.SetID(bondInformationIDRef_, ob);
             }
             else if (bondInformationNode.Attributes["href"] != null)
             {
                 bondInformationIDRef_ = bondInformationNode.Attributes["href"].Value;
             }
             else
             {
                 bondInformation_ = new BondInformation(bondInformationNode);
             }
         }
         else
         {
             bondInformation_ = new BondInformation(bondInformationNode);
         }
     }
     
 
     XmlNode bondCouponInfoNode = xmlNode.SelectSingleNode("bondCouponInfo");
     
     if (bondCouponInfoNode != null)
     {
         if (bondCouponInfoNode.Attributes["href"] != null || bondCouponInfoNode.Attributes["id"] != null) 
         {
             if (bondCouponInfoNode.Attributes["id"] != null) 
             {
                 bondCouponInfoIDRef_ = bondCouponInfoNode.Attributes["id"].Value;
                 BondCouponInfo ob = new BondCouponInfo(bondCouponInfoNode);
                 IDManager.SetID(bondCouponInfoIDRef_, ob);
             }
             else if (bondCouponInfoNode.Attributes["href"] != null)
             {
                 bondCouponInfoIDRef_ = bondCouponInfoNode.Attributes["href"].Value;
             }
             else
             {
                 bondCouponInfo_ = new BondCouponInfo(bondCouponInfoNode);
             }
         }
         else
         {
             bondCouponInfo_ = new BondCouponInfo(bondCouponInfoNode);
         }
     }
     
 
     XmlNode payoffInfoAnalyticNode = xmlNode.SelectSingleNode("payoffInfoAnalytic");
     
     if (payoffInfoAnalyticNode != null)
     {
         if (payoffInfoAnalyticNode.Attributes["href"] != null || payoffInfoAnalyticNode.Attributes["id"] != null) 
         {
             if (payoffInfoAnalyticNode.Attributes["id"] != null) 
             {
                 payoffInfoAnalyticIDRef_ = payoffInfoAnalyticNode.Attributes["id"].Value;
                 PayoffInfoAnalytic ob = new PayoffInfoAnalytic(payoffInfoAnalyticNode);
                 IDManager.SetID(payoffInfoAnalyticIDRef_, ob);
             }
             else if (payoffInfoAnalyticNode.Attributes["href"] != null)
             {
                 payoffInfoAnalyticIDRef_ = payoffInfoAnalyticNode.Attributes["href"].Value;
             }
             else
             {
                 payoffInfoAnalytic_ = new PayoffInfoAnalytic(payoffInfoAnalyticNode);
             }
         }
         else
         {
             payoffInfoAnalytic_ = new PayoffInfoAnalytic(payoffInfoAnalyticNode);
         }
     }
     
 
 }
示例#2
0
        public FixedBondInstrument(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode bondInformationNode = xmlNode.SelectSingleNode("bondInformation");

            if (bondInformationNode != null)
            {
                if (bondInformationNode.Attributes["href"] != null || bondInformationNode.Attributes["id"] != null)
                {
                    if (bondInformationNode.Attributes["id"] != null)
                    {
                        bondInformationIDRef_ = bondInformationNode.Attributes["id"].Value;
                        BondInformation ob = new BondInformation(bondInformationNode);
                        IDManager.SetID(bondInformationIDRef_, ob);
                    }
                    else if (bondInformationNode.Attributes["href"] != null)
                    {
                        bondInformationIDRef_ = bondInformationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        bondInformation_ = new BondInformation(bondInformationNode);
                    }
                }
                else
                {
                    bondInformation_ = new BondInformation(bondInformationNode);
                }
            }


            XmlNode bondCouponInfoNode = xmlNode.SelectSingleNode("bondCouponInfo");

            if (bondCouponInfoNode != null)
            {
                if (bondCouponInfoNode.Attributes["href"] != null || bondCouponInfoNode.Attributes["id"] != null)
                {
                    if (bondCouponInfoNode.Attributes["id"] != null)
                    {
                        bondCouponInfoIDRef_ = bondCouponInfoNode.Attributes["id"].Value;
                        BondCouponInfo ob = new BondCouponInfo(bondCouponInfoNode);
                        IDManager.SetID(bondCouponInfoIDRef_, ob);
                    }
                    else if (bondCouponInfoNode.Attributes["href"] != null)
                    {
                        bondCouponInfoIDRef_ = bondCouponInfoNode.Attributes["href"].Value;
                    }
                    else
                    {
                        bondCouponInfo_ = new BondCouponInfo(bondCouponInfoNode);
                    }
                }
                else
                {
                    bondCouponInfo_ = new BondCouponInfo(bondCouponInfoNode);
                }
            }


            XmlNode payoffInfoAnalyticNode = xmlNode.SelectSingleNode("payoffInfoAnalytic");

            if (payoffInfoAnalyticNode != null)
            {
                if (payoffInfoAnalyticNode.Attributes["href"] != null || payoffInfoAnalyticNode.Attributes["id"] != null)
                {
                    if (payoffInfoAnalyticNode.Attributes["id"] != null)
                    {
                        payoffInfoAnalyticIDRef_ = payoffInfoAnalyticNode.Attributes["id"].Value;
                        PayoffInfoAnalytic ob = new PayoffInfoAnalytic(payoffInfoAnalyticNode);
                        IDManager.SetID(payoffInfoAnalyticIDRef_, ob);
                    }
                    else if (payoffInfoAnalyticNode.Attributes["href"] != null)
                    {
                        payoffInfoAnalyticIDRef_ = payoffInfoAnalyticNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payoffInfoAnalytic_ = new PayoffInfoAnalytic(payoffInfoAnalyticNode);
                    }
                }
                else
                {
                    payoffInfoAnalytic_ = new PayoffInfoAnalytic(payoffInfoAnalyticNode);
                }
            }
        }