public ResetDates(XmlNode xmlNode)
        {
            XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");

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

            foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                        CalculationPeriodDatesReference ob = CalculationPeriodDatesReference();
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodDatesReference = new CalculationPeriodDatesReference(item);
                    }
                }
            }


            XmlNodeList resetRelativeToNodeList = xmlNode.SelectNodes("resetRelativeTo");

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

            foreach (XmlNode item in resetRelativeToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetRelativeToIDRef = item.Attributes["id"].Name;
                        ResetRelativeToEnum ob = ResetRelativeToEnum();
                        IDManager.SetID(resetRelativeToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetRelativeToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetRelativeTo = new ResetRelativeToEnum(item);
                    }
                }
            }


            XmlNodeList initialFixingDateNodeList = xmlNode.SelectNodes("initialFixingDate");

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

            foreach (XmlNode item in initialFixingDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        initialFixingDateIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(initialFixingDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        initialFixingDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        initialFixingDate = new RelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList fixingDatesNodeList = xmlNode.SelectNodes("fixingDates");

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

            foreach (XmlNode item in fixingDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingDatesIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(fixingDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingDates = new RelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList rateCutOffDaysOffsetNodeList = xmlNode.SelectNodes("rateCutOffDaysOffset");

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

            foreach (XmlNode item in rateCutOffDaysOffsetNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateCutOffDaysOffsetIDRef = item.Attributes["id"].Name;
                        Offset ob = Offset();
                        IDManager.SetID(rateCutOffDaysOffsetIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateCutOffDaysOffsetIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rateCutOffDaysOffset = new Offset(item);
                    }
                }
            }


            XmlNodeList resetFrequencyNodeList = xmlNode.SelectNodes("resetFrequency");

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

            foreach (XmlNode item in resetFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetFrequencyIDRef = item.Attributes["id"].Name;
                        ResetFrequency ob = ResetFrequency();
                        IDManager.SetID(resetFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetFrequency = new ResetFrequency(item);
                    }
                }
            }


            XmlNodeList resetDatesAdjustmentsNodeList = xmlNode.SelectNodes("resetDatesAdjustments");

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

            foreach (XmlNode item in resetDatesAdjustmentsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                        BusinessDayAdjustments ob = BusinessDayAdjustments();
                        IDManager.SetID(resetDatesAdjustmentsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetDatesAdjustmentsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetDatesAdjustments = new BusinessDayAdjustments(item);
                    }
                }
            }
        }
 public ResetDates(XmlNode xmlNode)
 {
     XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");
     
     if (calculationPeriodDatesReferenceNode != null)
     {
         if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                 CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
             }
             else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
             }
         }
         else
         {
             calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
         }
     }
     
 
     XmlNode resetRelativeToNode = xmlNode.SelectSingleNode("resetRelativeTo");
     
     if (resetRelativeToNode != null)
     {
         if (resetRelativeToNode.Attributes["href"] != null || resetRelativeToNode.Attributes["id"] != null) 
         {
             if (resetRelativeToNode.Attributes["id"] != null) 
             {
                 resetRelativeToIDRef_ = resetRelativeToNode.Attributes["id"].Value;
                 ResetRelativeToEnum ob = new ResetRelativeToEnum(resetRelativeToNode);
                 IDManager.SetID(resetRelativeToIDRef_, ob);
             }
             else if (resetRelativeToNode.Attributes["href"] != null)
             {
                 resetRelativeToIDRef_ = resetRelativeToNode.Attributes["href"].Value;
             }
             else
             {
                 resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
             }
         }
         else
         {
             resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
         }
     }
     
 
     XmlNode initialFixingDateNode = xmlNode.SelectSingleNode("initialFixingDate");
     
     if (initialFixingDateNode != null)
     {
         if (initialFixingDateNode.Attributes["href"] != null || initialFixingDateNode.Attributes["id"] != null) 
         {
             if (initialFixingDateNode.Attributes["id"] != null) 
             {
                 initialFixingDateIDRef_ = initialFixingDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(initialFixingDateNode);
                 IDManager.SetID(initialFixingDateIDRef_, ob);
             }
             else if (initialFixingDateNode.Attributes["href"] != null)
             {
                 initialFixingDateIDRef_ = initialFixingDateNode.Attributes["href"].Value;
             }
             else
             {
                 initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
             }
         }
         else
         {
             initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
         }
     }
     
 
     XmlNode fixingDatesNode = xmlNode.SelectSingleNode("fixingDates");
     
     if (fixingDatesNode != null)
     {
         if (fixingDatesNode.Attributes["href"] != null || fixingDatesNode.Attributes["id"] != null) 
         {
             if (fixingDatesNode.Attributes["id"] != null) 
             {
                 fixingDatesIDRef_ = fixingDatesNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(fixingDatesNode);
                 IDManager.SetID(fixingDatesIDRef_, ob);
             }
             else if (fixingDatesNode.Attributes["href"] != null)
             {
                 fixingDatesIDRef_ = fixingDatesNode.Attributes["href"].Value;
             }
             else
             {
                 fixingDates_ = new RelativeDateOffset(fixingDatesNode);
             }
         }
         else
         {
             fixingDates_ = new RelativeDateOffset(fixingDatesNode);
         }
     }
     
 
     XmlNode rateCutOffDaysOffsetNode = xmlNode.SelectSingleNode("rateCutOffDaysOffset");
     
     if (rateCutOffDaysOffsetNode != null)
     {
         if (rateCutOffDaysOffsetNode.Attributes["href"] != null || rateCutOffDaysOffsetNode.Attributes["id"] != null) 
         {
             if (rateCutOffDaysOffsetNode.Attributes["id"] != null) 
             {
                 rateCutOffDaysOffsetIDRef_ = rateCutOffDaysOffsetNode.Attributes["id"].Value;
                 Offset ob = new Offset(rateCutOffDaysOffsetNode);
                 IDManager.SetID(rateCutOffDaysOffsetIDRef_, ob);
             }
             else if (rateCutOffDaysOffsetNode.Attributes["href"] != null)
             {
                 rateCutOffDaysOffsetIDRef_ = rateCutOffDaysOffsetNode.Attributes["href"].Value;
             }
             else
             {
                 rateCutOffDaysOffset_ = new Offset(rateCutOffDaysOffsetNode);
             }
         }
         else
         {
             rateCutOffDaysOffset_ = new Offset(rateCutOffDaysOffsetNode);
         }
     }
     
 
     XmlNode resetFrequencyNode = xmlNode.SelectSingleNode("resetFrequency");
     
     if (resetFrequencyNode != null)
     {
         if (resetFrequencyNode.Attributes["href"] != null || resetFrequencyNode.Attributes["id"] != null) 
         {
             if (resetFrequencyNode.Attributes["id"] != null) 
             {
                 resetFrequencyIDRef_ = resetFrequencyNode.Attributes["id"].Value;
                 ResetFrequency ob = new ResetFrequency(resetFrequencyNode);
                 IDManager.SetID(resetFrequencyIDRef_, ob);
             }
             else if (resetFrequencyNode.Attributes["href"] != null)
             {
                 resetFrequencyIDRef_ = resetFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 resetFrequency_ = new ResetFrequency(resetFrequencyNode);
             }
         }
         else
         {
             resetFrequency_ = new ResetFrequency(resetFrequencyNode);
         }
     }
     
 
     XmlNode resetDatesAdjustmentsNode = xmlNode.SelectSingleNode("resetDatesAdjustments");
     
     if (resetDatesAdjustmentsNode != null)
     {
         if (resetDatesAdjustmentsNode.Attributes["href"] != null || resetDatesAdjustmentsNode.Attributes["id"] != null) 
         {
             if (resetDatesAdjustmentsNode.Attributes["id"] != null) 
             {
                 resetDatesAdjustmentsIDRef_ = resetDatesAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
                 IDManager.SetID(resetDatesAdjustmentsIDRef_, ob);
             }
             else if (resetDatesAdjustmentsNode.Attributes["href"] != null)
             {
                 resetDatesAdjustmentsIDRef_ = resetDatesAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 resetDatesAdjustments_ = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
             }
         }
         else
         {
             resetDatesAdjustments_ = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
         }
     }
     
 
 }
 public ResetDates(XmlNode xmlNode)
 {
     XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");
     if (calculationPeriodDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodDatesReference ob = CalculationPeriodDatesReference();
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesReference = new CalculationPeriodDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList resetRelativeToNodeList = xmlNode.SelectNodes("resetRelativeTo");
     if (resetRelativeToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetRelativeToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetRelativeToIDRef = item.Attributes["id"].Name;
                 ResetRelativeToEnum ob = ResetRelativeToEnum();
                 IDManager.SetID(resetRelativeToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetRelativeToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetRelativeTo = new ResetRelativeToEnum(item);
             }
         }
     }
     
 
     XmlNodeList initialFixingDateNodeList = xmlNode.SelectNodes("initialFixingDate");
     if (initialFixingDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in initialFixingDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialFixingDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(initialFixingDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialFixingDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 initialFixingDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList fixingDatesNodeList = xmlNode.SelectNodes("fixingDates");
     if (fixingDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingDatesIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(fixingDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingDates = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList rateCutOffDaysOffsetNodeList = xmlNode.SelectNodes("rateCutOffDaysOffset");
     if (rateCutOffDaysOffsetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in rateCutOffDaysOffsetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 rateCutOffDaysOffsetIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(rateCutOffDaysOffsetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 rateCutOffDaysOffsetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 rateCutOffDaysOffset = new Offset(item);
             }
         }
     }
     
 
     XmlNodeList resetFrequencyNodeList = xmlNode.SelectNodes("resetFrequency");
     if (resetFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetFrequencyIDRef = item.Attributes["id"].Name;
                 ResetFrequency ob = ResetFrequency();
                 IDManager.SetID(resetFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetFrequency = new ResetFrequency(item);
             }
         }
     }
     
 
     XmlNodeList resetDatesAdjustmentsNodeList = xmlNode.SelectNodes("resetDatesAdjustments");
     if (resetDatesAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetDatesAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(resetDatesAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetDatesAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetDatesAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
 }
 public InterestLegResetDates(XmlNode xmlNode)
 {
     XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");
     if (calculationPeriodDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                 InterestLegCalculationPeriodDatesReference ob = InterestLegCalculationPeriodDatesReference();
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesReference = new InterestLegCalculationPeriodDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList resetRelativeToNodeList = xmlNode.SelectNodes("resetRelativeTo");
     if (resetRelativeToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetRelativeToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetRelativeToIDRef = item.Attributes["id"].Name;
                 ResetRelativeToEnum ob = ResetRelativeToEnum();
                 IDManager.SetID(resetRelativeToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetRelativeToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetRelativeTo = new ResetRelativeToEnum(item);
             }
         }
     }
     
 
     XmlNodeList resetFrequencyNodeList = xmlNode.SelectNodes("resetFrequency");
     if (resetFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetFrequencyIDRef = item.Attributes["id"].Name;
                 ResetFrequency ob = ResetFrequency();
                 IDManager.SetID(resetFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetFrequency = new ResetFrequency(item);
             }
         }
     }
     
 
     XmlNodeList initialFixingDateNodeList = xmlNode.SelectNodes("initialFixingDate");
     if (initialFixingDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in initialFixingDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialFixingDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(initialFixingDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialFixingDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 initialFixingDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList fixingDatesNodeList = xmlNode.SelectNodes("fixingDates");
     if (fixingDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingDatesIDRef = item.Attributes["id"].Name;
                 AdjustableDatesOrRelativeDateOffset ob = AdjustableDatesOrRelativeDateOffset();
                 IDManager.SetID(fixingDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingDates = new AdjustableDatesOrRelativeDateOffset(item);
             }
         }
     }
     
 
 }
        public ResetDates(XmlNode xmlNode)
        {
            XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");

            if (calculationPeriodDatesReferenceNode != null)
            {
                if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                        CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                }
            }


            XmlNode resetRelativeToNode = xmlNode.SelectSingleNode("resetRelativeTo");

            if (resetRelativeToNode != null)
            {
                if (resetRelativeToNode.Attributes["href"] != null || resetRelativeToNode.Attributes["id"] != null)
                {
                    if (resetRelativeToNode.Attributes["id"] != null)
                    {
                        resetRelativeToIDRef_ = resetRelativeToNode.Attributes["id"].Value;
                        ResetRelativeToEnum ob = new ResetRelativeToEnum(resetRelativeToNode);
                        IDManager.SetID(resetRelativeToIDRef_, ob);
                    }
                    else if (resetRelativeToNode.Attributes["href"] != null)
                    {
                        resetRelativeToIDRef_ = resetRelativeToNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
                    }
                }
                else
                {
                    resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
                }
            }


            XmlNode initialFixingDateNode = xmlNode.SelectSingleNode("initialFixingDate");

            if (initialFixingDateNode != null)
            {
                if (initialFixingDateNode.Attributes["href"] != null || initialFixingDateNode.Attributes["id"] != null)
                {
                    if (initialFixingDateNode.Attributes["id"] != null)
                    {
                        initialFixingDateIDRef_ = initialFixingDateNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(initialFixingDateNode);
                        IDManager.SetID(initialFixingDateIDRef_, ob);
                    }
                    else if (initialFixingDateNode.Attributes["href"] != null)
                    {
                        initialFixingDateIDRef_ = initialFixingDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
                    }
                }
                else
                {
                    initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
                }
            }


            XmlNode fixingDatesNode = xmlNode.SelectSingleNode("fixingDates");

            if (fixingDatesNode != null)
            {
                if (fixingDatesNode.Attributes["href"] != null || fixingDatesNode.Attributes["id"] != null)
                {
                    if (fixingDatesNode.Attributes["id"] != null)
                    {
                        fixingDatesIDRef_ = fixingDatesNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(fixingDatesNode);
                        IDManager.SetID(fixingDatesIDRef_, ob);
                    }
                    else if (fixingDatesNode.Attributes["href"] != null)
                    {
                        fixingDatesIDRef_ = fixingDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingDates_ = new RelativeDateOffset(fixingDatesNode);
                    }
                }
                else
                {
                    fixingDates_ = new RelativeDateOffset(fixingDatesNode);
                }
            }


            XmlNode rateCutOffDaysOffsetNode = xmlNode.SelectSingleNode("rateCutOffDaysOffset");

            if (rateCutOffDaysOffsetNode != null)
            {
                if (rateCutOffDaysOffsetNode.Attributes["href"] != null || rateCutOffDaysOffsetNode.Attributes["id"] != null)
                {
                    if (rateCutOffDaysOffsetNode.Attributes["id"] != null)
                    {
                        rateCutOffDaysOffsetIDRef_ = rateCutOffDaysOffsetNode.Attributes["id"].Value;
                        Offset ob = new Offset(rateCutOffDaysOffsetNode);
                        IDManager.SetID(rateCutOffDaysOffsetIDRef_, ob);
                    }
                    else if (rateCutOffDaysOffsetNode.Attributes["href"] != null)
                    {
                        rateCutOffDaysOffsetIDRef_ = rateCutOffDaysOffsetNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rateCutOffDaysOffset_ = new Offset(rateCutOffDaysOffsetNode);
                    }
                }
                else
                {
                    rateCutOffDaysOffset_ = new Offset(rateCutOffDaysOffsetNode);
                }
            }


            XmlNode resetFrequencyNode = xmlNode.SelectSingleNode("resetFrequency");

            if (resetFrequencyNode != null)
            {
                if (resetFrequencyNode.Attributes["href"] != null || resetFrequencyNode.Attributes["id"] != null)
                {
                    if (resetFrequencyNode.Attributes["id"] != null)
                    {
                        resetFrequencyIDRef_ = resetFrequencyNode.Attributes["id"].Value;
                        ResetFrequency ob = new ResetFrequency(resetFrequencyNode);
                        IDManager.SetID(resetFrequencyIDRef_, ob);
                    }
                    else if (resetFrequencyNode.Attributes["href"] != null)
                    {
                        resetFrequencyIDRef_ = resetFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetFrequency_ = new ResetFrequency(resetFrequencyNode);
                    }
                }
                else
                {
                    resetFrequency_ = new ResetFrequency(resetFrequencyNode);
                }
            }


            XmlNode resetDatesAdjustmentsNode = xmlNode.SelectSingleNode("resetDatesAdjustments");

            if (resetDatesAdjustmentsNode != null)
            {
                if (resetDatesAdjustmentsNode.Attributes["href"] != null || resetDatesAdjustmentsNode.Attributes["id"] != null)
                {
                    if (resetDatesAdjustmentsNode.Attributes["id"] != null)
                    {
                        resetDatesAdjustmentsIDRef_ = resetDatesAdjustmentsNode.Attributes["id"].Value;
                        BusinessDayAdjustments ob = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
                        IDManager.SetID(resetDatesAdjustmentsIDRef_, ob);
                    }
                    else if (resetDatesAdjustmentsNode.Attributes["href"] != null)
                    {
                        resetDatesAdjustmentsIDRef_ = resetDatesAdjustmentsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetDatesAdjustments_ = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
                    }
                }
                else
                {
                    resetDatesAdjustments_ = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
                }
            }
        }
        public InterestLegResetDates(XmlNode xmlNode)
        {
            XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");

            if (calculationPeriodDatesReferenceNode != null)
            {
                if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                        InterestLegCalculationPeriodDatesReference ob = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodDatesReference_ = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodDatesReference_ = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                }
            }


            XmlNode resetRelativeToNode = xmlNode.SelectSingleNode("resetRelativeTo");

            if (resetRelativeToNode != null)
            {
                if (resetRelativeToNode.Attributes["href"] != null || resetRelativeToNode.Attributes["id"] != null)
                {
                    if (resetRelativeToNode.Attributes["id"] != null)
                    {
                        resetRelativeToIDRef_ = resetRelativeToNode.Attributes["id"].Value;
                        ResetRelativeToEnum ob = new ResetRelativeToEnum(resetRelativeToNode);
                        IDManager.SetID(resetRelativeToIDRef_, ob);
                    }
                    else if (resetRelativeToNode.Attributes["href"] != null)
                    {
                        resetRelativeToIDRef_ = resetRelativeToNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
                    }
                }
                else
                {
                    resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
                }
            }


            XmlNode resetFrequencyNode = xmlNode.SelectSingleNode("resetFrequency");

            if (resetFrequencyNode != null)
            {
                if (resetFrequencyNode.Attributes["href"] != null || resetFrequencyNode.Attributes["id"] != null)
                {
                    if (resetFrequencyNode.Attributes["id"] != null)
                    {
                        resetFrequencyIDRef_ = resetFrequencyNode.Attributes["id"].Value;
                        ResetFrequency ob = new ResetFrequency(resetFrequencyNode);
                        IDManager.SetID(resetFrequencyIDRef_, ob);
                    }
                    else if (resetFrequencyNode.Attributes["href"] != null)
                    {
                        resetFrequencyIDRef_ = resetFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetFrequency_ = new ResetFrequency(resetFrequencyNode);
                    }
                }
                else
                {
                    resetFrequency_ = new ResetFrequency(resetFrequencyNode);
                }
            }


            XmlNode initialFixingDateNode = xmlNode.SelectSingleNode("initialFixingDate");

            if (initialFixingDateNode != null)
            {
                if (initialFixingDateNode.Attributes["href"] != null || initialFixingDateNode.Attributes["id"] != null)
                {
                    if (initialFixingDateNode.Attributes["id"] != null)
                    {
                        initialFixingDateIDRef_ = initialFixingDateNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(initialFixingDateNode);
                        IDManager.SetID(initialFixingDateIDRef_, ob);
                    }
                    else if (initialFixingDateNode.Attributes["href"] != null)
                    {
                        initialFixingDateIDRef_ = initialFixingDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
                    }
                }
                else
                {
                    initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
                }
            }


            XmlNode fixingDatesNode = xmlNode.SelectSingleNode("fixingDates");

            if (fixingDatesNode != null)
            {
                if (fixingDatesNode.Attributes["href"] != null || fixingDatesNode.Attributes["id"] != null)
                {
                    if (fixingDatesNode.Attributes["id"] != null)
                    {
                        fixingDatesIDRef_ = fixingDatesNode.Attributes["id"].Value;
                        AdjustableDatesOrRelativeDateOffset ob = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                        IDManager.SetID(fixingDatesIDRef_, ob);
                    }
                    else if (fixingDatesNode.Attributes["href"] != null)
                    {
                        fixingDatesIDRef_ = fixingDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingDates_ = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                    }
                }
                else
                {
                    fixingDates_ = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                }
            }
        }
Exemple #7
0
        public InterestLegResetDates(XmlNode xmlNode)
        {
            XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");

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

            foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                        InterestLegCalculationPeriodDatesReference ob = InterestLegCalculationPeriodDatesReference();
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodDatesReference = new InterestLegCalculationPeriodDatesReference(item);
                    }
                }
            }


            XmlNodeList resetRelativeToNodeList = xmlNode.SelectNodes("resetRelativeTo");

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

            foreach (XmlNode item in resetRelativeToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetRelativeToIDRef = item.Attributes["id"].Name;
                        ResetRelativeToEnum ob = ResetRelativeToEnum();
                        IDManager.SetID(resetRelativeToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetRelativeToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetRelativeTo = new ResetRelativeToEnum(item);
                    }
                }
            }


            XmlNodeList resetFrequencyNodeList = xmlNode.SelectNodes("resetFrequency");

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

            foreach (XmlNode item in resetFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetFrequencyIDRef = item.Attributes["id"].Name;
                        ResetFrequency ob = ResetFrequency();
                        IDManager.SetID(resetFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetFrequency = new ResetFrequency(item);
                    }
                }
            }


            XmlNodeList initialFixingDateNodeList = xmlNode.SelectNodes("initialFixingDate");

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

            foreach (XmlNode item in initialFixingDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        initialFixingDateIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(initialFixingDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        initialFixingDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        initialFixingDate = new RelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList fixingDatesNodeList = xmlNode.SelectNodes("fixingDates");

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

            foreach (XmlNode item in fixingDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingDatesIDRef = item.Attributes["id"].Name;
                        AdjustableDatesOrRelativeDateOffset ob = AdjustableDatesOrRelativeDateOffset();
                        IDManager.SetID(fixingDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingDates = new AdjustableDatesOrRelativeDateOffset(item);
                    }
                }
            }
        }
 public InterestLegResetDates(XmlNode xmlNode)
 {
     XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");
     
     if (calculationPeriodDatesReferenceNode != null)
     {
         if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                 InterestLegCalculationPeriodDatesReference ob = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
             }
             else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesReference_ = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
             }
         }
         else
         {
             calculationPeriodDatesReference_ = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
         }
     }
     
 
     XmlNode resetRelativeToNode = xmlNode.SelectSingleNode("resetRelativeTo");
     
     if (resetRelativeToNode != null)
     {
         if (resetRelativeToNode.Attributes["href"] != null || resetRelativeToNode.Attributes["id"] != null) 
         {
             if (resetRelativeToNode.Attributes["id"] != null) 
             {
                 resetRelativeToIDRef_ = resetRelativeToNode.Attributes["id"].Value;
                 ResetRelativeToEnum ob = new ResetRelativeToEnum(resetRelativeToNode);
                 IDManager.SetID(resetRelativeToIDRef_, ob);
             }
             else if (resetRelativeToNode.Attributes["href"] != null)
             {
                 resetRelativeToIDRef_ = resetRelativeToNode.Attributes["href"].Value;
             }
             else
             {
                 resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
             }
         }
         else
         {
             resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
         }
     }
     
 
     XmlNode resetFrequencyNode = xmlNode.SelectSingleNode("resetFrequency");
     
     if (resetFrequencyNode != null)
     {
         if (resetFrequencyNode.Attributes["href"] != null || resetFrequencyNode.Attributes["id"] != null) 
         {
             if (resetFrequencyNode.Attributes["id"] != null) 
             {
                 resetFrequencyIDRef_ = resetFrequencyNode.Attributes["id"].Value;
                 ResetFrequency ob = new ResetFrequency(resetFrequencyNode);
                 IDManager.SetID(resetFrequencyIDRef_, ob);
             }
             else if (resetFrequencyNode.Attributes["href"] != null)
             {
                 resetFrequencyIDRef_ = resetFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 resetFrequency_ = new ResetFrequency(resetFrequencyNode);
             }
         }
         else
         {
             resetFrequency_ = new ResetFrequency(resetFrequencyNode);
         }
     }
     
 
     XmlNode initialFixingDateNode = xmlNode.SelectSingleNode("initialFixingDate");
     
     if (initialFixingDateNode != null)
     {
         if (initialFixingDateNode.Attributes["href"] != null || initialFixingDateNode.Attributes["id"] != null) 
         {
             if (initialFixingDateNode.Attributes["id"] != null) 
             {
                 initialFixingDateIDRef_ = initialFixingDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(initialFixingDateNode);
                 IDManager.SetID(initialFixingDateIDRef_, ob);
             }
             else if (initialFixingDateNode.Attributes["href"] != null)
             {
                 initialFixingDateIDRef_ = initialFixingDateNode.Attributes["href"].Value;
             }
             else
             {
                 initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
             }
         }
         else
         {
             initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
         }
     }
     
 
     XmlNode fixingDatesNode = xmlNode.SelectSingleNode("fixingDates");
     
     if (fixingDatesNode != null)
     {
         if (fixingDatesNode.Attributes["href"] != null || fixingDatesNode.Attributes["id"] != null) 
         {
             if (fixingDatesNode.Attributes["id"] != null) 
             {
                 fixingDatesIDRef_ = fixingDatesNode.Attributes["id"].Value;
                 AdjustableDatesOrRelativeDateOffset ob = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                 IDManager.SetID(fixingDatesIDRef_, ob);
             }
             else if (fixingDatesNode.Attributes["href"] != null)
             {
                 fixingDatesIDRef_ = fixingDatesNode.Attributes["href"].Value;
             }
             else
             {
                 fixingDates_ = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
             }
         }
         else
         {
             fixingDates_ = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
         }
     }
     
 
 }