public Asian(XmlNode xmlNode)
        {
            XmlNode averagingInOutNode = xmlNode.SelectSingleNode("averagingInOut");

            if (averagingInOutNode != null)
            {
                if (averagingInOutNode.Attributes["href"] != null || averagingInOutNode.Attributes["id"] != null)
                {
                    if (averagingInOutNode.Attributes["id"] != null)
                    {
                        averagingInOutIDRef_ = averagingInOutNode.Attributes["id"].Value;
                        AveragingInOutEnum ob = new AveragingInOutEnum(averagingInOutNode);
                        IDManager.SetID(averagingInOutIDRef_, ob);
                    }
                    else if (averagingInOutNode.Attributes["href"] != null)
                    {
                        averagingInOutIDRef_ = averagingInOutNode.Attributes["href"].Value;
                    }
                    else
                    {
                        averagingInOut_ = new AveragingInOutEnum(averagingInOutNode);
                    }
                }
                else
                {
                    averagingInOut_ = new AveragingInOutEnum(averagingInOutNode);
                }
            }


            XmlNode strikeFactorNode = xmlNode.SelectSingleNode("strikeFactor");

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


            XmlNode averagingPeriodInNode = xmlNode.SelectSingleNode("averagingPeriodIn");

            if (averagingPeriodInNode != null)
            {
                if (averagingPeriodInNode.Attributes["href"] != null || averagingPeriodInNode.Attributes["id"] != null)
                {
                    if (averagingPeriodInNode.Attributes["id"] != null)
                    {
                        averagingPeriodInIDRef_ = averagingPeriodInNode.Attributes["id"].Value;
                        AveragingPeriod ob = new AveragingPeriod(averagingPeriodInNode);
                        IDManager.SetID(averagingPeriodInIDRef_, ob);
                    }
                    else if (averagingPeriodInNode.Attributes["href"] != null)
                    {
                        averagingPeriodInIDRef_ = averagingPeriodInNode.Attributes["href"].Value;
                    }
                    else
                    {
                        averagingPeriodIn_ = new AveragingPeriod(averagingPeriodInNode);
                    }
                }
                else
                {
                    averagingPeriodIn_ = new AveragingPeriod(averagingPeriodInNode);
                }
            }


            XmlNode averagingPeriodOutNode = xmlNode.SelectSingleNode("averagingPeriodOut");

            if (averagingPeriodOutNode != null)
            {
                if (averagingPeriodOutNode.Attributes["href"] != null || averagingPeriodOutNode.Attributes["id"] != null)
                {
                    if (averagingPeriodOutNode.Attributes["id"] != null)
                    {
                        averagingPeriodOutIDRef_ = averagingPeriodOutNode.Attributes["id"].Value;
                        AveragingPeriod ob = new AveragingPeriod(averagingPeriodOutNode);
                        IDManager.SetID(averagingPeriodOutIDRef_, ob);
                    }
                    else if (averagingPeriodOutNode.Attributes["href"] != null)
                    {
                        averagingPeriodOutIDRef_ = averagingPeriodOutNode.Attributes["href"].Value;
                    }
                    else
                    {
                        averagingPeriodOut_ = new AveragingPeriod(averagingPeriodOutNode);
                    }
                }
                else
                {
                    averagingPeriodOut_ = new AveragingPeriod(averagingPeriodOutNode);
                }
            }
        }
 public Asian(XmlNode xmlNode)
 {
     XmlNodeList averagingInOutNodeList = xmlNode.SelectNodes("averagingInOut");
     if (averagingInOutNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in averagingInOutNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 averagingInOutIDRef = item.Attributes["id"].Name;
                 AveragingInOutEnum ob = AveragingInOutEnum();
                 IDManager.SetID(averagingInOutIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 averagingInOutIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 averagingInOut = new AveragingInOutEnum(item);
             }
         }
     }
     
 
     XmlNodeList strikeFactorNodeList = xmlNode.SelectNodes("strikeFactor");
     if (strikeFactorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in strikeFactorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 strikeFactorIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(strikeFactorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 strikeFactorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 strikeFactor = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList averagingPeriodInNodeList = xmlNode.SelectNodes("averagingPeriodIn");
     if (averagingPeriodInNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in averagingPeriodInNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 averagingPeriodInIDRef = item.Attributes["id"].Name;
                 AveragingPeriod ob = AveragingPeriod();
                 IDManager.SetID(averagingPeriodInIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 averagingPeriodInIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 averagingPeriodIn = new AveragingPeriod(item);
             }
         }
     }
     
 
     XmlNodeList averagingPeriodOutNodeList = xmlNode.SelectNodes("averagingPeriodOut");
     if (averagingPeriodOutNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in averagingPeriodOutNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 averagingPeriodOutIDRef = item.Attributes["id"].Name;
                 AveragingPeriod ob = AveragingPeriod();
                 IDManager.SetID(averagingPeriodOutIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 averagingPeriodOutIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 averagingPeriodOut = new AveragingPeriod(item);
             }
         }
     }
     
 
 }
        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);
                }
            }
        }
Beispiel #7
0
        public Asian(XmlNode xmlNode)
        {
            XmlNodeList averagingInOutNodeList = xmlNode.SelectNodes("averagingInOut");

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

            foreach (XmlNode item in averagingInOutNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        averagingInOutIDRef = item.Attributes["id"].Name;
                        AveragingInOutEnum ob = AveragingInOutEnum();
                        IDManager.SetID(averagingInOutIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        averagingInOutIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        averagingInOut = new AveragingInOutEnum(item);
                    }
                }
            }


            XmlNodeList strikeFactorNodeList = xmlNode.SelectNodes("strikeFactor");

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

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


            XmlNodeList averagingPeriodInNodeList = xmlNode.SelectNodes("averagingPeriodIn");

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

            foreach (XmlNode item in averagingPeriodInNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        averagingPeriodInIDRef = item.Attributes["id"].Name;
                        AveragingPeriod ob = AveragingPeriod();
                        IDManager.SetID(averagingPeriodInIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        averagingPeriodInIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        averagingPeriodIn = new AveragingPeriod(item);
                    }
                }
            }


            XmlNodeList averagingPeriodOutNodeList = xmlNode.SelectNodes("averagingPeriodOut");

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

            foreach (XmlNode item in averagingPeriodOutNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        averagingPeriodOutIDRef = item.Attributes["id"].Name;
                        AveragingPeriod ob = AveragingPeriod();
                        IDManager.SetID(averagingPeriodOutIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        averagingPeriodOutIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        averagingPeriodOut = new AveragingPeriod(item);
                    }
                }
            }
        }