public FloatingRateCalculation(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode initialRateNode = xmlNode.SelectSingleNode("initialRate");
     
     if (initialRateNode != null)
     {
         if (initialRateNode.Attributes["href"] != null || initialRateNode.Attributes["id"] != null) 
         {
             if (initialRateNode.Attributes["id"] != null) 
             {
                 initialRateIDRef_ = initialRateNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(initialRateNode);
                 IDManager.SetID(initialRateIDRef_, ob);
             }
             else if (initialRateNode.Attributes["href"] != null)
             {
                 initialRateIDRef_ = initialRateNode.Attributes["href"].Value;
             }
             else
             {
                 initialRate_ = new XsdTypeDecimal(initialRateNode);
             }
         }
         else
         {
             initialRate_ = new XsdTypeDecimal(initialRateNode);
         }
     }
     
 
     XmlNode finalRateRoundingNode = xmlNode.SelectSingleNode("finalRateRounding");
     
     if (finalRateRoundingNode != null)
     {
         if (finalRateRoundingNode.Attributes["href"] != null || finalRateRoundingNode.Attributes["id"] != null) 
         {
             if (finalRateRoundingNode.Attributes["id"] != null) 
             {
                 finalRateRoundingIDRef_ = finalRateRoundingNode.Attributes["id"].Value;
                 Rounding ob = new Rounding(finalRateRoundingNode);
                 IDManager.SetID(finalRateRoundingIDRef_, ob);
             }
             else if (finalRateRoundingNode.Attributes["href"] != null)
             {
                 finalRateRoundingIDRef_ = finalRateRoundingNode.Attributes["href"].Value;
             }
             else
             {
                 finalRateRounding_ = new Rounding(finalRateRoundingNode);
             }
         }
         else
         {
             finalRateRounding_ = new Rounding(finalRateRoundingNode);
         }
     }
     
 
     XmlNode averagingMethodNode = xmlNode.SelectSingleNode("averagingMethod");
     
     if (averagingMethodNode != null)
     {
         if (averagingMethodNode.Attributes["href"] != null || averagingMethodNode.Attributes["id"] != null) 
         {
             if (averagingMethodNode.Attributes["id"] != null) 
             {
                 averagingMethodIDRef_ = averagingMethodNode.Attributes["id"].Value;
                 AveragingMethodEnum ob = new AveragingMethodEnum(averagingMethodNode);
                 IDManager.SetID(averagingMethodIDRef_, ob);
             }
             else if (averagingMethodNode.Attributes["href"] != null)
             {
                 averagingMethodIDRef_ = averagingMethodNode.Attributes["href"].Value;
             }
             else
             {
                 averagingMethod_ = new AveragingMethodEnum(averagingMethodNode);
             }
         }
         else
         {
             averagingMethod_ = new AveragingMethodEnum(averagingMethodNode);
         }
     }
     
 
     XmlNode negativeInterestRateTreatmentNode = xmlNode.SelectSingleNode("negativeInterestRateTreatment");
     
     if (negativeInterestRateTreatmentNode != null)
     {
         if (negativeInterestRateTreatmentNode.Attributes["href"] != null || negativeInterestRateTreatmentNode.Attributes["id"] != null) 
         {
             if (negativeInterestRateTreatmentNode.Attributes["id"] != null) 
             {
                 negativeInterestRateTreatmentIDRef_ = negativeInterestRateTreatmentNode.Attributes["id"].Value;
                 NegativeInterestRateTreatmentEnum ob = new NegativeInterestRateTreatmentEnum(negativeInterestRateTreatmentNode);
                 IDManager.SetID(negativeInterestRateTreatmentIDRef_, ob);
             }
             else if (negativeInterestRateTreatmentNode.Attributes["href"] != null)
             {
                 negativeInterestRateTreatmentIDRef_ = negativeInterestRateTreatmentNode.Attributes["href"].Value;
             }
             else
             {
                 negativeInterestRateTreatment_ = new NegativeInterestRateTreatmentEnum(negativeInterestRateTreatmentNode);
             }
         }
         else
         {
             negativeInterestRateTreatment_ = new NegativeInterestRateTreatmentEnum(negativeInterestRateTreatmentNode);
         }
     }
     
 
 }
        public FloatingRateCalculation(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode initialRateNode = xmlNode.SelectSingleNode("initialRate");

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


            XmlNode finalRateRoundingNode = xmlNode.SelectSingleNode("finalRateRounding");

            if (finalRateRoundingNode != null)
            {
                if (finalRateRoundingNode.Attributes["href"] != null || finalRateRoundingNode.Attributes["id"] != null)
                {
                    if (finalRateRoundingNode.Attributes["id"] != null)
                    {
                        finalRateRoundingIDRef_ = finalRateRoundingNode.Attributes["id"].Value;
                        Rounding ob = new Rounding(finalRateRoundingNode);
                        IDManager.SetID(finalRateRoundingIDRef_, ob);
                    }
                    else if (finalRateRoundingNode.Attributes["href"] != null)
                    {
                        finalRateRoundingIDRef_ = finalRateRoundingNode.Attributes["href"].Value;
                    }
                    else
                    {
                        finalRateRounding_ = new Rounding(finalRateRoundingNode);
                    }
                }
                else
                {
                    finalRateRounding_ = new Rounding(finalRateRoundingNode);
                }
            }


            XmlNode averagingMethodNode = xmlNode.SelectSingleNode("averagingMethod");

            if (averagingMethodNode != null)
            {
                if (averagingMethodNode.Attributes["href"] != null || averagingMethodNode.Attributes["id"] != null)
                {
                    if (averagingMethodNode.Attributes["id"] != null)
                    {
                        averagingMethodIDRef_ = averagingMethodNode.Attributes["id"].Value;
                        AveragingMethodEnum ob = new AveragingMethodEnum(averagingMethodNode);
                        IDManager.SetID(averagingMethodIDRef_, ob);
                    }
                    else if (averagingMethodNode.Attributes["href"] != null)
                    {
                        averagingMethodIDRef_ = averagingMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        averagingMethod_ = new AveragingMethodEnum(averagingMethodNode);
                    }
                }
                else
                {
                    averagingMethod_ = new AveragingMethodEnum(averagingMethodNode);
                }
            }


            XmlNode negativeInterestRateTreatmentNode = xmlNode.SelectSingleNode("negativeInterestRateTreatment");

            if (negativeInterestRateTreatmentNode != null)
            {
                if (negativeInterestRateTreatmentNode.Attributes["href"] != null || negativeInterestRateTreatmentNode.Attributes["id"] != null)
                {
                    if (negativeInterestRateTreatmentNode.Attributes["id"] != null)
                    {
                        negativeInterestRateTreatmentIDRef_ = negativeInterestRateTreatmentNode.Attributes["id"].Value;
                        NegativeInterestRateTreatmentEnum ob = new NegativeInterestRateTreatmentEnum(negativeInterestRateTreatmentNode);
                        IDManager.SetID(negativeInterestRateTreatmentIDRef_, ob);
                    }
                    else if (negativeInterestRateTreatmentNode.Attributes["href"] != null)
                    {
                        negativeInterestRateTreatmentIDRef_ = negativeInterestRateTreatmentNode.Attributes["href"].Value;
                    }
                    else
                    {
                        negativeInterestRateTreatment_ = new NegativeInterestRateTreatmentEnum(negativeInterestRateTreatmentNode);
                    }
                }
                else
                {
                    negativeInterestRateTreatment_ = new NegativeInterestRateTreatmentEnum(negativeInterestRateTreatmentNode);
                }
            }
        }
示例#3
0
        public FloatingRateCalculation(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList initialRateNodeList = xmlNode.SelectNodes("initialRate");

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

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


            XmlNodeList finalRateRoundingNodeList = xmlNode.SelectNodes("finalRateRounding");

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

            foreach (XmlNode item in finalRateRoundingNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        finalRateRoundingIDRef = item.Attributes["id"].Name;
                        Rounding ob = Rounding();
                        IDManager.SetID(finalRateRoundingIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        finalRateRoundingIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        finalRateRounding = new Rounding(item);
                    }
                }
            }


            XmlNodeList averagingMethodNodeList = xmlNode.SelectNodes("averagingMethod");

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

            foreach (XmlNode item in averagingMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        averagingMethodIDRef = item.Attributes["id"].Name;
                        AveragingMethodEnum ob = AveragingMethodEnum();
                        IDManager.SetID(averagingMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        averagingMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        averagingMethod = new AveragingMethodEnum(item);
                    }
                }
            }


            XmlNodeList negativeInterestRateTreatmentNodeList = xmlNode.SelectNodes("negativeInterestRateTreatment");

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

            foreach (XmlNode item in negativeInterestRateTreatmentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        negativeInterestRateTreatmentIDRef = item.Attributes["id"].Name;
                        NegativeInterestRateTreatmentEnum ob = NegativeInterestRateTreatmentEnum();
                        IDManager.SetID(negativeInterestRateTreatmentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        negativeInterestRateTreatmentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        negativeInterestRateTreatment = new NegativeInterestRateTreatmentEnum(item);
                    }
                }
            }
        }