public InterestShortFall(XmlNode xmlNode)
        {
            XmlNode interestShortfallCapNode = xmlNode.SelectSingleNode("interestShortfallCap");

            if (interestShortfallCapNode != null)
            {
                if (interestShortfallCapNode.Attributes["href"] != null || interestShortfallCapNode.Attributes["id"] != null)
                {
                    if (interestShortfallCapNode.Attributes["id"] != null)
                    {
                        interestShortfallCapIDRef_ = interestShortfallCapNode.Attributes["id"].Value;
                        InterestShortfallCapEnum ob = new InterestShortfallCapEnum(interestShortfallCapNode);
                        IDManager.SetID(interestShortfallCapIDRef_, ob);
                    }
                    else if (interestShortfallCapNode.Attributes["href"] != null)
                    {
                        interestShortfallCapIDRef_ = interestShortfallCapNode.Attributes["href"].Value;
                    }
                    else
                    {
                        interestShortfallCap_ = new InterestShortfallCapEnum(interestShortfallCapNode);
                    }
                }
                else
                {
                    interestShortfallCap_ = new InterestShortfallCapEnum(interestShortfallCapNode);
                }
            }


            XmlNode compoundingNode = xmlNode.SelectSingleNode("compounding");

            if (compoundingNode != null)
            {
                if (compoundingNode.Attributes["href"] != null || compoundingNode.Attributes["id"] != null)
                {
                    if (compoundingNode.Attributes["id"] != null)
                    {
                        compoundingIDRef_ = compoundingNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(compoundingNode);
                        IDManager.SetID(compoundingIDRef_, ob);
                    }
                    else if (compoundingNode.Attributes["href"] != null)
                    {
                        compoundingIDRef_ = compoundingNode.Attributes["href"].Value;
                    }
                    else
                    {
                        compounding_ = new XsdTypeBoolean(compoundingNode);
                    }
                }
                else
                {
                    compounding_ = new XsdTypeBoolean(compoundingNode);
                }
            }


            XmlNode rateSourceNode = xmlNode.SelectSingleNode("rateSource");

            if (rateSourceNode != null)
            {
                if (rateSourceNode.Attributes["href"] != null || rateSourceNode.Attributes["id"] != null)
                {
                    if (rateSourceNode.Attributes["id"] != null)
                    {
                        rateSourceIDRef_ = rateSourceNode.Attributes["id"].Value;
                        FloatingRateIndex ob = new FloatingRateIndex(rateSourceNode);
                        IDManager.SetID(rateSourceIDRef_, ob);
                    }
                    else if (rateSourceNode.Attributes["href"] != null)
                    {
                        rateSourceIDRef_ = rateSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rateSource_ = new FloatingRateIndex(rateSourceNode);
                    }
                }
                else
                {
                    rateSource_ = new FloatingRateIndex(rateSourceNode);
                }
            }
        }
Ejemplo n.º 2
0
        public InterestShortFall(XmlNode xmlNode)
        {
            XmlNodeList interestShortfallCapNodeList = xmlNode.SelectNodes("interestShortfallCap");

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

            foreach (XmlNode item in interestShortfallCapNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        interestShortfallCapIDRef = item.Attributes["id"].Name;
                        InterestShortfallCapEnum ob = InterestShortfallCapEnum();
                        IDManager.SetID(interestShortfallCapIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        interestShortfallCapIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        interestShortfallCap = new InterestShortfallCapEnum(item);
                    }
                }
            }


            XmlNodeList compoundingNodeList = xmlNode.SelectNodes("compounding");

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

            foreach (XmlNode item in compoundingNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        compoundingIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(compoundingIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        compoundingIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        compounding = new XsdTypeBoolean(item);
                    }
                }
            }


            XmlNodeList rateSourceNodeList = xmlNode.SelectNodes("rateSource");

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

            foreach (XmlNode item in rateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateSourceIDRef = item.Attributes["id"].Name;
                        FloatingRateIndex ob = FloatingRateIndex();
                        IDManager.SetID(rateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rateSource = new FloatingRateIndex(item);
                    }
                }
            }
        }
 public InterestShortFall(XmlNode xmlNode)
 {
     XmlNode interestShortfallCapNode = xmlNode.SelectSingleNode("interestShortfallCap");
     
     if (interestShortfallCapNode != null)
     {
         if (interestShortfallCapNode.Attributes["href"] != null || interestShortfallCapNode.Attributes["id"] != null) 
         {
             if (interestShortfallCapNode.Attributes["id"] != null) 
             {
                 interestShortfallCapIDRef_ = interestShortfallCapNode.Attributes["id"].Value;
                 InterestShortfallCapEnum ob = new InterestShortfallCapEnum(interestShortfallCapNode);
                 IDManager.SetID(interestShortfallCapIDRef_, ob);
             }
             else if (interestShortfallCapNode.Attributes["href"] != null)
             {
                 interestShortfallCapIDRef_ = interestShortfallCapNode.Attributes["href"].Value;
             }
             else
             {
                 interestShortfallCap_ = new InterestShortfallCapEnum(interestShortfallCapNode);
             }
         }
         else
         {
             interestShortfallCap_ = new InterestShortfallCapEnum(interestShortfallCapNode);
         }
     }
     
 
     XmlNode compoundingNode = xmlNode.SelectSingleNode("compounding");
     
     if (compoundingNode != null)
     {
         if (compoundingNode.Attributes["href"] != null || compoundingNode.Attributes["id"] != null) 
         {
             if (compoundingNode.Attributes["id"] != null) 
             {
                 compoundingIDRef_ = compoundingNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(compoundingNode);
                 IDManager.SetID(compoundingIDRef_, ob);
             }
             else if (compoundingNode.Attributes["href"] != null)
             {
                 compoundingIDRef_ = compoundingNode.Attributes["href"].Value;
             }
             else
             {
                 compounding_ = new XsdTypeBoolean(compoundingNode);
             }
         }
         else
         {
             compounding_ = new XsdTypeBoolean(compoundingNode);
         }
     }
     
 
     XmlNode rateSourceNode = xmlNode.SelectSingleNode("rateSource");
     
     if (rateSourceNode != null)
     {
         if (rateSourceNode.Attributes["href"] != null || rateSourceNode.Attributes["id"] != null) 
         {
             if (rateSourceNode.Attributes["id"] != null) 
             {
                 rateSourceIDRef_ = rateSourceNode.Attributes["id"].Value;
                 FloatingRateIndex ob = new FloatingRateIndex(rateSourceNode);
                 IDManager.SetID(rateSourceIDRef_, ob);
             }
             else if (rateSourceNode.Attributes["href"] != null)
             {
                 rateSourceIDRef_ = rateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 rateSource_ = new FloatingRateIndex(rateSourceNode);
             }
         }
         else
         {
             rateSource_ = new FloatingRateIndex(rateSourceNode);
         }
     }
     
 
 }