Example #1
0
        public InterestLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList interestLegCalculationPeriodDatesNodeList = xmlNode.SelectNodes("interestLegCalculationPeriodDates");

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

            foreach (XmlNode item in interestLegCalculationPeriodDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        interestLegCalculationPeriodDatesIDRef = item.Attributes["id"].Name;
                        InterestLegCalculationPeriodDates ob = InterestLegCalculationPeriodDates();
                        IDManager.SetID(interestLegCalculationPeriodDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        interestLegCalculationPeriodDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        interestLegCalculationPeriodDates = new InterestLegCalculationPeriodDates(item);
                    }
                }
            }


            XmlNodeList notionalNodeList = xmlNode.SelectNodes("notional");

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

            foreach (XmlNode item in notionalNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        notionalIDRef = item.Attributes["id"].Name;
                        ReturnSwapNotional ob = ReturnSwapNotional();
                        IDManager.SetID(notionalIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        notionalIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        notional = new ReturnSwapNotional(item);
                    }
                }
            }


            XmlNodeList interestAmountNodeList = xmlNode.SelectNodes("interestAmount");

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

            foreach (XmlNode item in interestAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        interestAmountIDRef = item.Attributes["id"].Name;
                        LegAmount ob = LegAmount();
                        IDManager.SetID(interestAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        interestAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        interestAmount = new LegAmount(item);
                    }
                }
            }


            XmlNodeList interestCalculationNodeList = xmlNode.SelectNodes("interestCalculation");

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

            foreach (XmlNode item in interestCalculationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        interestCalculationIDRef = item.Attributes["id"].Name;
                        InterestCalculation ob = InterestCalculation();
                        IDManager.SetID(interestCalculationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        interestCalculationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        interestCalculation = new InterestCalculation(item);
                    }
                }
            }


            XmlNodeList stubCalculationPeriodNodeList = xmlNode.SelectNodes("stubCalculationPeriod");

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

            foreach (XmlNode item in stubCalculationPeriodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        stubCalculationPeriodIDRef = item.Attributes["id"].Name;
                        StubCalculationPeriod ob = StubCalculationPeriod();
                        IDManager.SetID(stubCalculationPeriodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        stubCalculationPeriodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        stubCalculationPeriod = new StubCalculationPeriod(item);
                    }
                }
            }
        }
 public InterestLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList interestLegCalculationPeriodDatesNodeList = xmlNode.SelectNodes("interestLegCalculationPeriodDates");
     if (interestLegCalculationPeriodDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interestLegCalculationPeriodDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interestLegCalculationPeriodDatesIDRef = item.Attributes["id"].Name;
                 InterestLegCalculationPeriodDates ob = InterestLegCalculationPeriodDates();
                 IDManager.SetID(interestLegCalculationPeriodDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interestLegCalculationPeriodDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interestLegCalculationPeriodDates = new InterestLegCalculationPeriodDates(item);
             }
         }
     }
     
 
     XmlNodeList notionalNodeList = xmlNode.SelectNodes("notional");
     if (notionalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalIDRef = item.Attributes["id"].Name;
                 ReturnSwapNotional ob = ReturnSwapNotional();
                 IDManager.SetID(notionalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notional = new ReturnSwapNotional(item);
             }
         }
     }
     
 
     XmlNodeList interestAmountNodeList = xmlNode.SelectNodes("interestAmount");
     if (interestAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interestAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interestAmountIDRef = item.Attributes["id"].Name;
                 LegAmount ob = LegAmount();
                 IDManager.SetID(interestAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interestAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interestAmount = new LegAmount(item);
             }
         }
     }
     
 
     XmlNodeList interestCalculationNodeList = xmlNode.SelectNodes("interestCalculation");
     if (interestCalculationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interestCalculationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interestCalculationIDRef = item.Attributes["id"].Name;
                 InterestCalculation ob = InterestCalculation();
                 IDManager.SetID(interestCalculationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interestCalculationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interestCalculation = new InterestCalculation(item);
             }
         }
     }
     
 
     XmlNodeList stubCalculationPeriodNodeList = xmlNode.SelectNodes("stubCalculationPeriod");
     if (stubCalculationPeriodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in stubCalculationPeriodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 stubCalculationPeriodIDRef = item.Attributes["id"].Name;
                 StubCalculationPeriod ob = StubCalculationPeriod();
                 IDManager.SetID(stubCalculationPeriodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 stubCalculationPeriodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 stubCalculationPeriod = new StubCalculationPeriod(item);
             }
         }
     }
     
 
 }
        public InterestLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode interestLegCalculationPeriodDatesNode = xmlNode.SelectSingleNode("interestLegCalculationPeriodDates");

            if (interestLegCalculationPeriodDatesNode != null)
            {
                if (interestLegCalculationPeriodDatesNode.Attributes["href"] != null || interestLegCalculationPeriodDatesNode.Attributes["id"] != null)
                {
                    if (interestLegCalculationPeriodDatesNode.Attributes["id"] != null)
                    {
                        interestLegCalculationPeriodDatesIDRef_ = interestLegCalculationPeriodDatesNode.Attributes["id"].Value;
                        InterestLegCalculationPeriodDates ob = new InterestLegCalculationPeriodDates(interestLegCalculationPeriodDatesNode);
                        IDManager.SetID(interestLegCalculationPeriodDatesIDRef_, ob);
                    }
                    else if (interestLegCalculationPeriodDatesNode.Attributes["href"] != null)
                    {
                        interestLegCalculationPeriodDatesIDRef_ = interestLegCalculationPeriodDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        interestLegCalculationPeriodDates_ = new InterestLegCalculationPeriodDates(interestLegCalculationPeriodDatesNode);
                    }
                }
                else
                {
                    interestLegCalculationPeriodDates_ = new InterestLegCalculationPeriodDates(interestLegCalculationPeriodDatesNode);
                }
            }


            XmlNode notionalNode = xmlNode.SelectSingleNode("notional");

            if (notionalNode != null)
            {
                if (notionalNode.Attributes["href"] != null || notionalNode.Attributes["id"] != null)
                {
                    if (notionalNode.Attributes["id"] != null)
                    {
                        notionalIDRef_ = notionalNode.Attributes["id"].Value;
                        ReturnSwapNotional ob = new ReturnSwapNotional(notionalNode);
                        IDManager.SetID(notionalIDRef_, ob);
                    }
                    else if (notionalNode.Attributes["href"] != null)
                    {
                        notionalIDRef_ = notionalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        notional_ = new ReturnSwapNotional(notionalNode);
                    }
                }
                else
                {
                    notional_ = new ReturnSwapNotional(notionalNode);
                }
            }


            XmlNode interestAmountNode = xmlNode.SelectSingleNode("interestAmount");

            if (interestAmountNode != null)
            {
                if (interestAmountNode.Attributes["href"] != null || interestAmountNode.Attributes["id"] != null)
                {
                    if (interestAmountNode.Attributes["id"] != null)
                    {
                        interestAmountIDRef_ = interestAmountNode.Attributes["id"].Value;
                        LegAmount ob = new LegAmount(interestAmountNode);
                        IDManager.SetID(interestAmountIDRef_, ob);
                    }
                    else if (interestAmountNode.Attributes["href"] != null)
                    {
                        interestAmountIDRef_ = interestAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        interestAmount_ = new LegAmount(interestAmountNode);
                    }
                }
                else
                {
                    interestAmount_ = new LegAmount(interestAmountNode);
                }
            }


            XmlNode interestCalculationNode = xmlNode.SelectSingleNode("interestCalculation");

            if (interestCalculationNode != null)
            {
                if (interestCalculationNode.Attributes["href"] != null || interestCalculationNode.Attributes["id"] != null)
                {
                    if (interestCalculationNode.Attributes["id"] != null)
                    {
                        interestCalculationIDRef_ = interestCalculationNode.Attributes["id"].Value;
                        InterestCalculation ob = new InterestCalculation(interestCalculationNode);
                        IDManager.SetID(interestCalculationIDRef_, ob);
                    }
                    else if (interestCalculationNode.Attributes["href"] != null)
                    {
                        interestCalculationIDRef_ = interestCalculationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        interestCalculation_ = new InterestCalculation(interestCalculationNode);
                    }
                }
                else
                {
                    interestCalculation_ = new InterestCalculation(interestCalculationNode);
                }
            }


            XmlNode stubCalculationPeriodNode = xmlNode.SelectSingleNode("stubCalculationPeriod");

            if (stubCalculationPeriodNode != null)
            {
                if (stubCalculationPeriodNode.Attributes["href"] != null || stubCalculationPeriodNode.Attributes["id"] != null)
                {
                    if (stubCalculationPeriodNode.Attributes["id"] != null)
                    {
                        stubCalculationPeriodIDRef_ = stubCalculationPeriodNode.Attributes["id"].Value;
                        StubCalculationPeriod ob = new StubCalculationPeriod(stubCalculationPeriodNode);
                        IDManager.SetID(stubCalculationPeriodIDRef_, ob);
                    }
                    else if (stubCalculationPeriodNode.Attributes["href"] != null)
                    {
                        stubCalculationPeriodIDRef_ = stubCalculationPeriodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        stubCalculationPeriod_ = new StubCalculationPeriod(stubCalculationPeriodNode);
                    }
                }
                else
                {
                    stubCalculationPeriod_ = new StubCalculationPeriod(stubCalculationPeriodNode);
                }
            }
        }
        public ReturnLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList rateOfReturnNodeList = xmlNode.SelectNodes("rateOfReturn");

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

            foreach (XmlNode item in rateOfReturnNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateOfReturnIDRef = item.Attributes["id"].Name;
                        ReturnLegValuation ob = ReturnLegValuation();
                        IDManager.SetID(rateOfReturnIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateOfReturnIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rateOfReturn = new ReturnLegValuation(item);
                    }
                }
            }


            XmlNodeList notionalNodeList = xmlNode.SelectNodes("notional");

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

            foreach (XmlNode item in notionalNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        notionalIDRef = item.Attributes["id"].Name;
                        ReturnSwapNotional ob = ReturnSwapNotional();
                        IDManager.SetID(notionalIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        notionalIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        notional = new ReturnSwapNotional(item);
                    }
                }
            }


            XmlNodeList amountNodeList = xmlNode.SelectNodes("amount");

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

            foreach (XmlNode item in amountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        amountIDRef = item.Attributes["id"].Name;
                        ReturnSwapAmount ob = ReturnSwapAmount();
                        IDManager.SetID(amountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        amountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        amount = new ReturnSwapAmount(item);
                    }
                }
            }


            XmlNodeList returnNodeList = xmlNode.SelectNodes("return");

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

            foreach (XmlNode item in returnNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        returnIDRef = item.Attributes["id"].Name;
                        Return ob = Return();
                        IDManager.SetID(returnIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        returnIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        return( = new Return(item));
                    }
                }
            }


            XmlNodeList notionalAdjustmentsNodeList = xmlNode.SelectNodes("notionalAdjustments");

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

            foreach (XmlNode item in notionalAdjustmentsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        notionalAdjustmentsIDRef = item.Attributes["id"].Name;
                        NotionalAdjustmentEnum ob = NotionalAdjustmentEnum();
                        IDManager.SetID(notionalAdjustmentsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        notionalAdjustmentsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        notionalAdjustments = new NotionalAdjustmentEnum(item);
                    }
                }
            }


            XmlNodeList fxFeatureNodeList = xmlNode.SelectNodes("fxFeature");

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

            foreach (XmlNode item in fxFeatureNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fxFeatureIDRef = item.Attributes["id"].Name;
                        FxFeature ob = FxFeature();
                        IDManager.SetID(fxFeatureIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fxFeatureIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fxFeature = new FxFeature(item);
                    }
                }
            }


            XmlNodeList averagingDatesNodeList = xmlNode.SelectNodes("averagingDates");

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

            foreach (XmlNode item in averagingDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        averagingDatesIDRef = item.Attributes["id"].Name;
                        AveragingPeriod ob = AveragingPeriod();
                        IDManager.SetID(averagingDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        averagingDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        averagingDates = new AveragingPeriod(item);
                    }
                }
            }
        }
 public ReturnLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode rateOfReturnNode = xmlNode.SelectSingleNode("rateOfReturn");
     
     if (rateOfReturnNode != null)
     {
         if (rateOfReturnNode.Attributes["href"] != null || rateOfReturnNode.Attributes["id"] != null) 
         {
             if (rateOfReturnNode.Attributes["id"] != null) 
             {
                 rateOfReturnIDRef_ = rateOfReturnNode.Attributes["id"].Value;
                 ReturnLegValuation ob = new ReturnLegValuation(rateOfReturnNode);
                 IDManager.SetID(rateOfReturnIDRef_, ob);
             }
             else if (rateOfReturnNode.Attributes["href"] != null)
             {
                 rateOfReturnIDRef_ = rateOfReturnNode.Attributes["href"].Value;
             }
             else
             {
                 rateOfReturn_ = new ReturnLegValuation(rateOfReturnNode);
             }
         }
         else
         {
             rateOfReturn_ = new ReturnLegValuation(rateOfReturnNode);
         }
     }
     
 
     XmlNode notionalNode = xmlNode.SelectSingleNode("notional");
     
     if (notionalNode != null)
     {
         if (notionalNode.Attributes["href"] != null || notionalNode.Attributes["id"] != null) 
         {
             if (notionalNode.Attributes["id"] != null) 
             {
                 notionalIDRef_ = notionalNode.Attributes["id"].Value;
                 ReturnSwapNotional ob = new ReturnSwapNotional(notionalNode);
                 IDManager.SetID(notionalIDRef_, ob);
             }
             else if (notionalNode.Attributes["href"] != null)
             {
                 notionalIDRef_ = notionalNode.Attributes["href"].Value;
             }
             else
             {
                 notional_ = new ReturnSwapNotional(notionalNode);
             }
         }
         else
         {
             notional_ = new ReturnSwapNotional(notionalNode);
         }
     }
     
 
     XmlNode amountNode = xmlNode.SelectSingleNode("amount");
     
     if (amountNode != null)
     {
         if (amountNode.Attributes["href"] != null || amountNode.Attributes["id"] != null) 
         {
             if (amountNode.Attributes["id"] != null) 
             {
                 amountIDRef_ = amountNode.Attributes["id"].Value;
                 ReturnSwapAmount ob = new ReturnSwapAmount(amountNode);
                 IDManager.SetID(amountIDRef_, ob);
             }
             else if (amountNode.Attributes["href"] != null)
             {
                 amountIDRef_ = amountNode.Attributes["href"].Value;
             }
             else
             {
                 amount_ = new ReturnSwapAmount(amountNode);
             }
         }
         else
         {
             amount_ = new ReturnSwapAmount(amountNode);
         }
     }
     
 
     XmlNode returnNode = xmlNode.SelectSingleNode("return");
     
     if (returnNode != null)
     {
         if (returnNode.Attributes["href"] != null || returnNode.Attributes["id"] != null) 
         {
             if (returnNode.Attributes["id"] != null) 
             {
                 returnIDRef_ = returnNode.Attributes["id"].Value;
                 Return ob = new Return(returnNode);
                 IDManager.SetID(returnIDRef_, ob);
             }
             else if (returnNode.Attributes["href"] != null)
             {
                 returnIDRef_ = returnNode.Attributes["href"].Value;
             }
             else
             {
                 return_ = new Return(returnNode);
             }
         }
         else
         {
             return_ = new Return(returnNode);
         }
     }
     
 
     XmlNode notionalAdjustmentsNode = xmlNode.SelectSingleNode("notionalAdjustments");
     
     if (notionalAdjustmentsNode != null)
     {
         if (notionalAdjustmentsNode.Attributes["href"] != null || notionalAdjustmentsNode.Attributes["id"] != null) 
         {
             if (notionalAdjustmentsNode.Attributes["id"] != null) 
             {
                 notionalAdjustmentsIDRef_ = notionalAdjustmentsNode.Attributes["id"].Value;
                 NotionalAdjustmentEnum ob = new NotionalAdjustmentEnum(notionalAdjustmentsNode);
                 IDManager.SetID(notionalAdjustmentsIDRef_, ob);
             }
             else if (notionalAdjustmentsNode.Attributes["href"] != null)
             {
                 notionalAdjustmentsIDRef_ = notionalAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 notionalAdjustments_ = new NotionalAdjustmentEnum(notionalAdjustmentsNode);
             }
         }
         else
         {
             notionalAdjustments_ = new NotionalAdjustmentEnum(notionalAdjustmentsNode);
         }
     }
     
 
     XmlNode fxFeatureNode = xmlNode.SelectSingleNode("fxFeature");
     
     if (fxFeatureNode != null)
     {
         if (fxFeatureNode.Attributes["href"] != null || fxFeatureNode.Attributes["id"] != null) 
         {
             if (fxFeatureNode.Attributes["id"] != null) 
             {
                 fxFeatureIDRef_ = fxFeatureNode.Attributes["id"].Value;
                 FxFeature ob = new FxFeature(fxFeatureNode);
                 IDManager.SetID(fxFeatureIDRef_, ob);
             }
             else if (fxFeatureNode.Attributes["href"] != null)
             {
                 fxFeatureIDRef_ = fxFeatureNode.Attributes["href"].Value;
             }
             else
             {
                 fxFeature_ = new FxFeature(fxFeatureNode);
             }
         }
         else
         {
             fxFeature_ = new FxFeature(fxFeatureNode);
         }
     }
     
 
     XmlNode averagingDatesNode = xmlNode.SelectSingleNode("averagingDates");
     
     if (averagingDatesNode != null)
     {
         if (averagingDatesNode.Attributes["href"] != null || averagingDatesNode.Attributes["id"] != null) 
         {
             if (averagingDatesNode.Attributes["id"] != null) 
             {
                 averagingDatesIDRef_ = averagingDatesNode.Attributes["id"].Value;
                 AveragingPeriod ob = new AveragingPeriod(averagingDatesNode);
                 IDManager.SetID(averagingDatesIDRef_, ob);
             }
             else if (averagingDatesNode.Attributes["href"] != null)
             {
                 averagingDatesIDRef_ = averagingDatesNode.Attributes["href"].Value;
             }
             else
             {
                 averagingDates_ = new AveragingPeriod(averagingDatesNode);
             }
         }
         else
         {
             averagingDates_ = new AveragingPeriod(averagingDatesNode);
         }
     }
     
 
 }
 public ReturnLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList rateOfReturnNodeList = xmlNode.SelectNodes("rateOfReturn");
     if (rateOfReturnNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in rateOfReturnNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 rateOfReturnIDRef = item.Attributes["id"].Name;
                 ReturnLegValuation ob = ReturnLegValuation();
                 IDManager.SetID(rateOfReturnIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 rateOfReturnIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 rateOfReturn = new ReturnLegValuation(item);
             }
         }
     }
     
 
     XmlNodeList notionalNodeList = xmlNode.SelectNodes("notional");
     if (notionalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalIDRef = item.Attributes["id"].Name;
                 ReturnSwapNotional ob = ReturnSwapNotional();
                 IDManager.SetID(notionalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notional = new ReturnSwapNotional(item);
             }
         }
     }
     
 
     XmlNodeList amountNodeList = xmlNode.SelectNodes("amount");
     if (amountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in amountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 amountIDRef = item.Attributes["id"].Name;
                 ReturnSwapAmount ob = ReturnSwapAmount();
                 IDManager.SetID(amountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 amountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 amount = new ReturnSwapAmount(item);
             }
         }
     }
     
 
     XmlNodeList returnNodeList = xmlNode.SelectNodes("return");
     if (returnNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in returnNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 returnIDRef = item.Attributes["id"].Name;
                 Return ob = Return();
                 IDManager.SetID(returnIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 returnIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 return = new Return(item);
             }
         }
     }
     
 
     XmlNodeList notionalAdjustmentsNodeList = xmlNode.SelectNodes("notionalAdjustments");
     if (notionalAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalAdjustmentsIDRef = item.Attributes["id"].Name;
                 NotionalAdjustmentEnum ob = NotionalAdjustmentEnum();
                 IDManager.SetID(notionalAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notionalAdjustments = new NotionalAdjustmentEnum(item);
             }
         }
     }
     
 
     XmlNodeList fxFeatureNodeList = xmlNode.SelectNodes("fxFeature");
     if (fxFeatureNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxFeatureNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxFeatureIDRef = item.Attributes["id"].Name;
                 FxFeature ob = FxFeature();
                 IDManager.SetID(fxFeatureIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxFeatureIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxFeature = new FxFeature(item);
             }
         }
     }
     
 
     XmlNodeList averagingDatesNodeList = xmlNode.SelectNodes("averagingDates");
     if (averagingDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in averagingDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 averagingDatesIDRef = item.Attributes["id"].Name;
                 AveragingPeriod ob = AveragingPeriod();
                 IDManager.SetID(averagingDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 averagingDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 averagingDates = new AveragingPeriod(item);
             }
         }
     }
     
 
 }
        public ReturnLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode rateOfReturnNode = xmlNode.SelectSingleNode("rateOfReturn");

            if (rateOfReturnNode != null)
            {
                if (rateOfReturnNode.Attributes["href"] != null || rateOfReturnNode.Attributes["id"] != null)
                {
                    if (rateOfReturnNode.Attributes["id"] != null)
                    {
                        rateOfReturnIDRef_ = rateOfReturnNode.Attributes["id"].Value;
                        ReturnLegValuation ob = new ReturnLegValuation(rateOfReturnNode);
                        IDManager.SetID(rateOfReturnIDRef_, ob);
                    }
                    else if (rateOfReturnNode.Attributes["href"] != null)
                    {
                        rateOfReturnIDRef_ = rateOfReturnNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rateOfReturn_ = new ReturnLegValuation(rateOfReturnNode);
                    }
                }
                else
                {
                    rateOfReturn_ = new ReturnLegValuation(rateOfReturnNode);
                }
            }


            XmlNode notionalNode = xmlNode.SelectSingleNode("notional");

            if (notionalNode != null)
            {
                if (notionalNode.Attributes["href"] != null || notionalNode.Attributes["id"] != null)
                {
                    if (notionalNode.Attributes["id"] != null)
                    {
                        notionalIDRef_ = notionalNode.Attributes["id"].Value;
                        ReturnSwapNotional ob = new ReturnSwapNotional(notionalNode);
                        IDManager.SetID(notionalIDRef_, ob);
                    }
                    else if (notionalNode.Attributes["href"] != null)
                    {
                        notionalIDRef_ = notionalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        notional_ = new ReturnSwapNotional(notionalNode);
                    }
                }
                else
                {
                    notional_ = new ReturnSwapNotional(notionalNode);
                }
            }


            XmlNode amountNode = xmlNode.SelectSingleNode("amount");

            if (amountNode != null)
            {
                if (amountNode.Attributes["href"] != null || amountNode.Attributes["id"] != null)
                {
                    if (amountNode.Attributes["id"] != null)
                    {
                        amountIDRef_ = amountNode.Attributes["id"].Value;
                        ReturnSwapAmount ob = new ReturnSwapAmount(amountNode);
                        IDManager.SetID(amountIDRef_, ob);
                    }
                    else if (amountNode.Attributes["href"] != null)
                    {
                        amountIDRef_ = amountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        amount_ = new ReturnSwapAmount(amountNode);
                    }
                }
                else
                {
                    amount_ = new ReturnSwapAmount(amountNode);
                }
            }


            XmlNode returnNode = xmlNode.SelectSingleNode("return");

            if (returnNode != null)
            {
                if (returnNode.Attributes["href"] != null || returnNode.Attributes["id"] != null)
                {
                    if (returnNode.Attributes["id"] != null)
                    {
                        returnIDRef_ = returnNode.Attributes["id"].Value;
                        Return ob = new Return(returnNode);
                        IDManager.SetID(returnIDRef_, ob);
                    }
                    else if (returnNode.Attributes["href"] != null)
                    {
                        returnIDRef_ = returnNode.Attributes["href"].Value;
                    }
                    else
                    {
                        return_ = new Return(returnNode);
                    }
                }
                else
                {
                    return_ = new Return(returnNode);
                }
            }


            XmlNode notionalAdjustmentsNode = xmlNode.SelectSingleNode("notionalAdjustments");

            if (notionalAdjustmentsNode != null)
            {
                if (notionalAdjustmentsNode.Attributes["href"] != null || notionalAdjustmentsNode.Attributes["id"] != null)
                {
                    if (notionalAdjustmentsNode.Attributes["id"] != null)
                    {
                        notionalAdjustmentsIDRef_ = notionalAdjustmentsNode.Attributes["id"].Value;
                        NotionalAdjustmentEnum ob = new NotionalAdjustmentEnum(notionalAdjustmentsNode);
                        IDManager.SetID(notionalAdjustmentsIDRef_, ob);
                    }
                    else if (notionalAdjustmentsNode.Attributes["href"] != null)
                    {
                        notionalAdjustmentsIDRef_ = notionalAdjustmentsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        notionalAdjustments_ = new NotionalAdjustmentEnum(notionalAdjustmentsNode);
                    }
                }
                else
                {
                    notionalAdjustments_ = new NotionalAdjustmentEnum(notionalAdjustmentsNode);
                }
            }


            XmlNode fxFeatureNode = xmlNode.SelectSingleNode("fxFeature");

            if (fxFeatureNode != null)
            {
                if (fxFeatureNode.Attributes["href"] != null || fxFeatureNode.Attributes["id"] != null)
                {
                    if (fxFeatureNode.Attributes["id"] != null)
                    {
                        fxFeatureIDRef_ = fxFeatureNode.Attributes["id"].Value;
                        FxFeature ob = new FxFeature(fxFeatureNode);
                        IDManager.SetID(fxFeatureIDRef_, ob);
                    }
                    else if (fxFeatureNode.Attributes["href"] != null)
                    {
                        fxFeatureIDRef_ = fxFeatureNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fxFeature_ = new FxFeature(fxFeatureNode);
                    }
                }
                else
                {
                    fxFeature_ = new FxFeature(fxFeatureNode);
                }
            }


            XmlNode averagingDatesNode = xmlNode.SelectSingleNode("averagingDates");

            if (averagingDatesNode != null)
            {
                if (averagingDatesNode.Attributes["href"] != null || averagingDatesNode.Attributes["id"] != null)
                {
                    if (averagingDatesNode.Attributes["id"] != null)
                    {
                        averagingDatesIDRef_ = averagingDatesNode.Attributes["id"].Value;
                        AveragingPeriod ob = new AveragingPeriod(averagingDatesNode);
                        IDManager.SetID(averagingDatesIDRef_, ob);
                    }
                    else if (averagingDatesNode.Attributes["href"] != null)
                    {
                        averagingDatesIDRef_ = averagingDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        averagingDates_ = new AveragingPeriod(averagingDatesNode);
                    }
                }
                else
                {
                    averagingDates_ = new AveragingPeriod(averagingDatesNode);
                }
            }
        }
 public InterestLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode interestLegCalculationPeriodDatesNode = xmlNode.SelectSingleNode("interestLegCalculationPeriodDates");
     
     if (interestLegCalculationPeriodDatesNode != null)
     {
         if (interestLegCalculationPeriodDatesNode.Attributes["href"] != null || interestLegCalculationPeriodDatesNode.Attributes["id"] != null) 
         {
             if (interestLegCalculationPeriodDatesNode.Attributes["id"] != null) 
             {
                 interestLegCalculationPeriodDatesIDRef_ = interestLegCalculationPeriodDatesNode.Attributes["id"].Value;
                 InterestLegCalculationPeriodDates ob = new InterestLegCalculationPeriodDates(interestLegCalculationPeriodDatesNode);
                 IDManager.SetID(interestLegCalculationPeriodDatesIDRef_, ob);
             }
             else if (interestLegCalculationPeriodDatesNode.Attributes["href"] != null)
             {
                 interestLegCalculationPeriodDatesIDRef_ = interestLegCalculationPeriodDatesNode.Attributes["href"].Value;
             }
             else
             {
                 interestLegCalculationPeriodDates_ = new InterestLegCalculationPeriodDates(interestLegCalculationPeriodDatesNode);
             }
         }
         else
         {
             interestLegCalculationPeriodDates_ = new InterestLegCalculationPeriodDates(interestLegCalculationPeriodDatesNode);
         }
     }
     
 
     XmlNode notionalNode = xmlNode.SelectSingleNode("notional");
     
     if (notionalNode != null)
     {
         if (notionalNode.Attributes["href"] != null || notionalNode.Attributes["id"] != null) 
         {
             if (notionalNode.Attributes["id"] != null) 
             {
                 notionalIDRef_ = notionalNode.Attributes["id"].Value;
                 ReturnSwapNotional ob = new ReturnSwapNotional(notionalNode);
                 IDManager.SetID(notionalIDRef_, ob);
             }
             else if (notionalNode.Attributes["href"] != null)
             {
                 notionalIDRef_ = notionalNode.Attributes["href"].Value;
             }
             else
             {
                 notional_ = new ReturnSwapNotional(notionalNode);
             }
         }
         else
         {
             notional_ = new ReturnSwapNotional(notionalNode);
         }
     }
     
 
     XmlNode interestAmountNode = xmlNode.SelectSingleNode("interestAmount");
     
     if (interestAmountNode != null)
     {
         if (interestAmountNode.Attributes["href"] != null || interestAmountNode.Attributes["id"] != null) 
         {
             if (interestAmountNode.Attributes["id"] != null) 
             {
                 interestAmountIDRef_ = interestAmountNode.Attributes["id"].Value;
                 LegAmount ob = new LegAmount(interestAmountNode);
                 IDManager.SetID(interestAmountIDRef_, ob);
             }
             else if (interestAmountNode.Attributes["href"] != null)
             {
                 interestAmountIDRef_ = interestAmountNode.Attributes["href"].Value;
             }
             else
             {
                 interestAmount_ = new LegAmount(interestAmountNode);
             }
         }
         else
         {
             interestAmount_ = new LegAmount(interestAmountNode);
         }
     }
     
 
     XmlNode interestCalculationNode = xmlNode.SelectSingleNode("interestCalculation");
     
     if (interestCalculationNode != null)
     {
         if (interestCalculationNode.Attributes["href"] != null || interestCalculationNode.Attributes["id"] != null) 
         {
             if (interestCalculationNode.Attributes["id"] != null) 
             {
                 interestCalculationIDRef_ = interestCalculationNode.Attributes["id"].Value;
                 InterestCalculation ob = new InterestCalculation(interestCalculationNode);
                 IDManager.SetID(interestCalculationIDRef_, ob);
             }
             else if (interestCalculationNode.Attributes["href"] != null)
             {
                 interestCalculationIDRef_ = interestCalculationNode.Attributes["href"].Value;
             }
             else
             {
                 interestCalculation_ = new InterestCalculation(interestCalculationNode);
             }
         }
         else
         {
             interestCalculation_ = new InterestCalculation(interestCalculationNode);
         }
     }
     
 
     XmlNode stubCalculationPeriodNode = xmlNode.SelectSingleNode("stubCalculationPeriod");
     
     if (stubCalculationPeriodNode != null)
     {
         if (stubCalculationPeriodNode.Attributes["href"] != null || stubCalculationPeriodNode.Attributes["id"] != null) 
         {
             if (stubCalculationPeriodNode.Attributes["id"] != null) 
             {
                 stubCalculationPeriodIDRef_ = stubCalculationPeriodNode.Attributes["id"].Value;
                 StubCalculationPeriod ob = new StubCalculationPeriod(stubCalculationPeriodNode);
                 IDManager.SetID(stubCalculationPeriodIDRef_, ob);
             }
             else if (stubCalculationPeriodNode.Attributes["href"] != null)
             {
                 stubCalculationPeriodIDRef_ = stubCalculationPeriodNode.Attributes["href"].Value;
             }
             else
             {
                 stubCalculationPeriod_ = new StubCalculationPeriod(stubCalculationPeriodNode);
             }
         }
         else
         {
             stubCalculationPeriod_ = new StubCalculationPeriod(stubCalculationPeriodNode);
         }
     }
     
 
 }