Exemple #1
0
        public CapFloor(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList capFloorStreamNodeList = xmlNode.SelectNodes("capFloorStream");

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

            foreach (XmlNode item in capFloorStreamNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        capFloorStreamIDRef = item.Attributes["id"].Name;
                        InterestRateStream ob = InterestRateStream();
                        IDManager.SetID(capFloorStreamIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        capFloorStreamIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        capFloorStream = new InterestRateStream(item);
                    }
                }
            }


            XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium");

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


            XmlNodeList additionalPaymentNodeList = xmlNode.SelectNodes("additionalPayment");

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


            XmlNodeList earlyTerminationProvisionNodeList = xmlNode.SelectNodes("earlyTerminationProvision");

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

            foreach (XmlNode item in earlyTerminationProvisionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        earlyTerminationProvisionIDRef = item.Attributes["id"].Name;
                        EarlyTerminationProvision ob = EarlyTerminationProvision();
                        IDManager.SetID(earlyTerminationProvisionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        earlyTerminationProvisionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        earlyTerminationProvision = new EarlyTerminationProvision(item);
                    }
                }
            }
        }
 public CapFloor(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode capFloorStreamNode = xmlNode.SelectSingleNode("capFloorStream");
     
     if (capFloorStreamNode != null)
     {
         if (capFloorStreamNode.Attributes["href"] != null || capFloorStreamNode.Attributes["id"] != null) 
         {
             if (capFloorStreamNode.Attributes["id"] != null) 
             {
                 capFloorStreamIDRef_ = capFloorStreamNode.Attributes["id"].Value;
                 InterestRateStream ob = new InterestRateStream(capFloorStreamNode);
                 IDManager.SetID(capFloorStreamIDRef_, ob);
             }
             else if (capFloorStreamNode.Attributes["href"] != null)
             {
                 capFloorStreamIDRef_ = capFloorStreamNode.Attributes["href"].Value;
             }
             else
             {
                 capFloorStream_ = new InterestRateStream(capFloorStreamNode);
             }
         }
         else
         {
             capFloorStream_ = new InterestRateStream(capFloorStreamNode);
         }
     }
     
 
     XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium");
     
     if (premiumNodeList != null)
     {
         this.premium_ = new List<Payment>();
         foreach (XmlNode item in premiumNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     premiumIDRef_ = item.Attributes["id"].Value;
                     premium_.Add(new Payment(item));
                     IDManager.SetID(premiumIDRef_, premium_[premium_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     premiumIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 premium_.Add(new Payment(item));
                 }
             }
             else
             {
                 premium_.Add(new Payment(item));
             }
         }
     }
     
 
     XmlNodeList additionalPaymentNodeList = xmlNode.SelectNodes("additionalPayment");
     
     if (additionalPaymentNodeList != null)
     {
         this.additionalPayment_ = new List<Payment>();
         foreach (XmlNode item in additionalPaymentNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     additionalPaymentIDRef_ = item.Attributes["id"].Value;
                     additionalPayment_.Add(new Payment(item));
                     IDManager.SetID(additionalPaymentIDRef_, additionalPayment_[additionalPayment_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     additionalPaymentIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 additionalPayment_.Add(new Payment(item));
                 }
             }
             else
             {
                 additionalPayment_.Add(new Payment(item));
             }
         }
     }
     
 
     XmlNode earlyTerminationProvisionNode = xmlNode.SelectSingleNode("earlyTerminationProvision");
     
     if (earlyTerminationProvisionNode != null)
     {
         if (earlyTerminationProvisionNode.Attributes["href"] != null || earlyTerminationProvisionNode.Attributes["id"] != null) 
         {
             if (earlyTerminationProvisionNode.Attributes["id"] != null) 
             {
                 earlyTerminationProvisionIDRef_ = earlyTerminationProvisionNode.Attributes["id"].Value;
                 EarlyTerminationProvision ob = new EarlyTerminationProvision(earlyTerminationProvisionNode);
                 IDManager.SetID(earlyTerminationProvisionIDRef_, ob);
             }
             else if (earlyTerminationProvisionNode.Attributes["href"] != null)
             {
                 earlyTerminationProvisionIDRef_ = earlyTerminationProvisionNode.Attributes["href"].Value;
             }
             else
             {
                 earlyTerminationProvision_ = new EarlyTerminationProvision(earlyTerminationProvisionNode);
             }
         }
         else
         {
             earlyTerminationProvision_ = new EarlyTerminationProvision(earlyTerminationProvisionNode);
         }
     }
     
 
 }
Exemple #3
0
        public CapFloor(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode capFloorStreamNode = xmlNode.SelectSingleNode("capFloorStream");

            if (capFloorStreamNode != null)
            {
                if (capFloorStreamNode.Attributes["href"] != null || capFloorStreamNode.Attributes["id"] != null)
                {
                    if (capFloorStreamNode.Attributes["id"] != null)
                    {
                        capFloorStreamIDRef_ = capFloorStreamNode.Attributes["id"].Value;
                        InterestRateStream ob = new InterestRateStream(capFloorStreamNode);
                        IDManager.SetID(capFloorStreamIDRef_, ob);
                    }
                    else if (capFloorStreamNode.Attributes["href"] != null)
                    {
                        capFloorStreamIDRef_ = capFloorStreamNode.Attributes["href"].Value;
                    }
                    else
                    {
                        capFloorStream_ = new InterestRateStream(capFloorStreamNode);
                    }
                }
                else
                {
                    capFloorStream_ = new InterestRateStream(capFloorStreamNode);
                }
            }


            XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium");

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


            XmlNodeList additionalPaymentNodeList = xmlNode.SelectNodes("additionalPayment");

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


            XmlNode earlyTerminationProvisionNode = xmlNode.SelectSingleNode("earlyTerminationProvision");

            if (earlyTerminationProvisionNode != null)
            {
                if (earlyTerminationProvisionNode.Attributes["href"] != null || earlyTerminationProvisionNode.Attributes["id"] != null)
                {
                    if (earlyTerminationProvisionNode.Attributes["id"] != null)
                    {
                        earlyTerminationProvisionIDRef_ = earlyTerminationProvisionNode.Attributes["id"].Value;
                        EarlyTerminationProvision ob = new EarlyTerminationProvision(earlyTerminationProvisionNode);
                        IDManager.SetID(earlyTerminationProvisionIDRef_, ob);
                    }
                    else if (earlyTerminationProvisionNode.Attributes["href"] != null)
                    {
                        earlyTerminationProvisionIDRef_ = earlyTerminationProvisionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        earlyTerminationProvision_ = new EarlyTerminationProvision(earlyTerminationProvisionNode);
                    }
                }
                else
                {
                    earlyTerminationProvision_ = new EarlyTerminationProvision(earlyTerminationProvisionNode);
                }
            }
        }
 public CapFloor(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList capFloorStreamNodeList = xmlNode.SelectNodes("capFloorStream");
     if (capFloorStreamNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in capFloorStreamNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 capFloorStreamIDRef = item.Attributes["id"].Name;
                 InterestRateStream ob = InterestRateStream();
                 IDManager.SetID(capFloorStreamIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 capFloorStreamIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 capFloorStream = new InterestRateStream(item);
             }
         }
     }
     
 
     XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium");
     
     foreach (XmlNode item in premiumNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 premiumIDRef = item.Attributes["id"].Name;
                 List<Payment> ob = new List<Payment>();
                 ob.Add(new Payment(item));
                 IDManager.SetID(premiumIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 premiumIDRef = item.Attributes["href"].Name;
             }
             else
             {
             premium.Add(new Payment(item));
             }
         }
     }
     
 
     XmlNodeList additionalPaymentNodeList = xmlNode.SelectNodes("additionalPayment");
     
     foreach (XmlNode item in additionalPaymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 additionalPaymentIDRef = item.Attributes["id"].Name;
                 List<Payment> ob = new List<Payment>();
                 ob.Add(new Payment(item));
                 IDManager.SetID(additionalPaymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 additionalPaymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
             additionalPayment.Add(new Payment(item));
             }
         }
     }
     
 
     XmlNodeList earlyTerminationProvisionNodeList = xmlNode.SelectNodes("earlyTerminationProvision");
     if (earlyTerminationProvisionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in earlyTerminationProvisionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 earlyTerminationProvisionIDRef = item.Attributes["id"].Name;
                 EarlyTerminationProvision ob = EarlyTerminationProvision();
                 IDManager.SetID(earlyTerminationProvisionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 earlyTerminationProvisionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 earlyTerminationProvision = new EarlyTerminationProvision(item);
             }
         }
     }
     
 
 }