public FxCurveValuation(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList settlementCurrencyYieldCurveNodeList = xmlNode.SelectNodes("settlementCurrencyYieldCurve");
     if (settlementCurrencyYieldCurveNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementCurrencyYieldCurveNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementCurrencyYieldCurveIDRef = item.Attributes["id"].Name;
                 PricingStructureReference ob = PricingStructureReference();
                 IDManager.SetID(settlementCurrencyYieldCurveIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementCurrencyYieldCurveIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementCurrencyYieldCurve = new PricingStructureReference(item);
             }
         }
     }
     
 
     XmlNodeList forecastCurrencyYieldCurveNodeList = xmlNode.SelectNodes("forecastCurrencyYieldCurve");
     if (forecastCurrencyYieldCurveNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in forecastCurrencyYieldCurveNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 forecastCurrencyYieldCurveIDRef = item.Attributes["id"].Name;
                 PricingStructureReference ob = PricingStructureReference();
                 IDManager.SetID(forecastCurrencyYieldCurveIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 forecastCurrencyYieldCurveIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 forecastCurrencyYieldCurve = new PricingStructureReference(item);
             }
         }
     }
     
 
     XmlNodeList spotRateNodeList = xmlNode.SelectNodes("spotRate");
     if (spotRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in spotRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 spotRateIDRef = item.Attributes["id"].Name;
                 FxRateSet ob = FxRateSet();
                 IDManager.SetID(spotRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 spotRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 spotRate = new FxRateSet(item);
             }
         }
     }
     
 
     XmlNodeList fxForwardCurveNodeList = xmlNode.SelectNodes("fxForwardCurve");
     if (fxForwardCurveNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxForwardCurveNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxForwardCurveIDRef = item.Attributes["id"].Name;
                 TermCurve ob = TermCurve();
                 IDManager.SetID(fxForwardCurveIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxForwardCurveIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxForwardCurve = new TermCurve(item);
             }
         }
     }
     
 
     XmlNodeList fxForwardPointsCurveNodeList = xmlNode.SelectNodes("fxForwardPointsCurve");
     if (fxForwardPointsCurveNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxForwardPointsCurveNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxForwardPointsCurveIDRef = item.Attributes["id"].Name;
                 TermCurve ob = TermCurve();
                 IDManager.SetID(fxForwardPointsCurveIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxForwardPointsCurveIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxForwardPointsCurve = new TermCurve(item);
             }
         }
     }
     
 
 }
        public FxCurveValuation(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode settlementCurrencyYieldCurveNode = xmlNode.SelectSingleNode("settlementCurrencyYieldCurve");

            if (settlementCurrencyYieldCurveNode != null)
            {
                if (settlementCurrencyYieldCurveNode.Attributes["href"] != null || settlementCurrencyYieldCurveNode.Attributes["id"] != null)
                {
                    if (settlementCurrencyYieldCurveNode.Attributes["id"] != null)
                    {
                        settlementCurrencyYieldCurveIDRef_ = settlementCurrencyYieldCurveNode.Attributes["id"].Value;
                        PricingStructureReference ob = new PricingStructureReference(settlementCurrencyYieldCurveNode);
                        IDManager.SetID(settlementCurrencyYieldCurveIDRef_, ob);
                    }
                    else if (settlementCurrencyYieldCurveNode.Attributes["href"] != null)
                    {
                        settlementCurrencyYieldCurveIDRef_ = settlementCurrencyYieldCurveNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settlementCurrencyYieldCurve_ = new PricingStructureReference(settlementCurrencyYieldCurveNode);
                    }
                }
                else
                {
                    settlementCurrencyYieldCurve_ = new PricingStructureReference(settlementCurrencyYieldCurveNode);
                }
            }


            XmlNode forecastCurrencyYieldCurveNode = xmlNode.SelectSingleNode("forecastCurrencyYieldCurve");

            if (forecastCurrencyYieldCurveNode != null)
            {
                if (forecastCurrencyYieldCurveNode.Attributes["href"] != null || forecastCurrencyYieldCurveNode.Attributes["id"] != null)
                {
                    if (forecastCurrencyYieldCurveNode.Attributes["id"] != null)
                    {
                        forecastCurrencyYieldCurveIDRef_ = forecastCurrencyYieldCurveNode.Attributes["id"].Value;
                        PricingStructureReference ob = new PricingStructureReference(forecastCurrencyYieldCurveNode);
                        IDManager.SetID(forecastCurrencyYieldCurveIDRef_, ob);
                    }
                    else if (forecastCurrencyYieldCurveNode.Attributes["href"] != null)
                    {
                        forecastCurrencyYieldCurveIDRef_ = forecastCurrencyYieldCurveNode.Attributes["href"].Value;
                    }
                    else
                    {
                        forecastCurrencyYieldCurve_ = new PricingStructureReference(forecastCurrencyYieldCurveNode);
                    }
                }
                else
                {
                    forecastCurrencyYieldCurve_ = new PricingStructureReference(forecastCurrencyYieldCurveNode);
                }
            }


            XmlNode spotRateNode = xmlNode.SelectSingleNode("spotRate");

            if (spotRateNode != null)
            {
                if (spotRateNode.Attributes["href"] != null || spotRateNode.Attributes["id"] != null)
                {
                    if (spotRateNode.Attributes["id"] != null)
                    {
                        spotRateIDRef_ = spotRateNode.Attributes["id"].Value;
                        FxRateSet ob = new FxRateSet(spotRateNode);
                        IDManager.SetID(spotRateIDRef_, ob);
                    }
                    else if (spotRateNode.Attributes["href"] != null)
                    {
                        spotRateIDRef_ = spotRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        spotRate_ = new FxRateSet(spotRateNode);
                    }
                }
                else
                {
                    spotRate_ = new FxRateSet(spotRateNode);
                }
            }


            XmlNode fxForwardCurveNode = xmlNode.SelectSingleNode("fxForwardCurve");

            if (fxForwardCurveNode != null)
            {
                if (fxForwardCurveNode.Attributes["href"] != null || fxForwardCurveNode.Attributes["id"] != null)
                {
                    if (fxForwardCurveNode.Attributes["id"] != null)
                    {
                        fxForwardCurveIDRef_ = fxForwardCurveNode.Attributes["id"].Value;
                        TermCurve ob = new TermCurve(fxForwardCurveNode);
                        IDManager.SetID(fxForwardCurveIDRef_, ob);
                    }
                    else if (fxForwardCurveNode.Attributes["href"] != null)
                    {
                        fxForwardCurveIDRef_ = fxForwardCurveNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fxForwardCurve_ = new TermCurve(fxForwardCurveNode);
                    }
                }
                else
                {
                    fxForwardCurve_ = new TermCurve(fxForwardCurveNode);
                }
            }


            XmlNode fxForwardPointsCurveNode = xmlNode.SelectSingleNode("fxForwardPointsCurve");

            if (fxForwardPointsCurveNode != null)
            {
                if (fxForwardPointsCurveNode.Attributes["href"] != null || fxForwardPointsCurveNode.Attributes["id"] != null)
                {
                    if (fxForwardPointsCurveNode.Attributes["id"] != null)
                    {
                        fxForwardPointsCurveIDRef_ = fxForwardPointsCurveNode.Attributes["id"].Value;
                        TermCurve ob = new TermCurve(fxForwardPointsCurveNode);
                        IDManager.SetID(fxForwardPointsCurveIDRef_, ob);
                    }
                    else if (fxForwardPointsCurveNode.Attributes["href"] != null)
                    {
                        fxForwardPointsCurveIDRef_ = fxForwardPointsCurveNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fxForwardPointsCurve_ = new TermCurve(fxForwardPointsCurveNode);
                    }
                }
                else
                {
                    fxForwardPointsCurve_ = new TermCurve(fxForwardPointsCurveNode);
                }
            }
        }
 public FxCurveValuation(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode settlementCurrencyYieldCurveNode = xmlNode.SelectSingleNode("settlementCurrencyYieldCurve");
     
     if (settlementCurrencyYieldCurveNode != null)
     {
         if (settlementCurrencyYieldCurveNode.Attributes["href"] != null || settlementCurrencyYieldCurveNode.Attributes["id"] != null) 
         {
             if (settlementCurrencyYieldCurveNode.Attributes["id"] != null) 
             {
                 settlementCurrencyYieldCurveIDRef_ = settlementCurrencyYieldCurveNode.Attributes["id"].Value;
                 PricingStructureReference ob = new PricingStructureReference(settlementCurrencyYieldCurveNode);
                 IDManager.SetID(settlementCurrencyYieldCurveIDRef_, ob);
             }
             else if (settlementCurrencyYieldCurveNode.Attributes["href"] != null)
             {
                 settlementCurrencyYieldCurveIDRef_ = settlementCurrencyYieldCurveNode.Attributes["href"].Value;
             }
             else
             {
                 settlementCurrencyYieldCurve_ = new PricingStructureReference(settlementCurrencyYieldCurveNode);
             }
         }
         else
         {
             settlementCurrencyYieldCurve_ = new PricingStructureReference(settlementCurrencyYieldCurveNode);
         }
     }
     
 
     XmlNode forecastCurrencyYieldCurveNode = xmlNode.SelectSingleNode("forecastCurrencyYieldCurve");
     
     if (forecastCurrencyYieldCurveNode != null)
     {
         if (forecastCurrencyYieldCurveNode.Attributes["href"] != null || forecastCurrencyYieldCurveNode.Attributes["id"] != null) 
         {
             if (forecastCurrencyYieldCurveNode.Attributes["id"] != null) 
             {
                 forecastCurrencyYieldCurveIDRef_ = forecastCurrencyYieldCurveNode.Attributes["id"].Value;
                 PricingStructureReference ob = new PricingStructureReference(forecastCurrencyYieldCurveNode);
                 IDManager.SetID(forecastCurrencyYieldCurveIDRef_, ob);
             }
             else if (forecastCurrencyYieldCurveNode.Attributes["href"] != null)
             {
                 forecastCurrencyYieldCurveIDRef_ = forecastCurrencyYieldCurveNode.Attributes["href"].Value;
             }
             else
             {
                 forecastCurrencyYieldCurve_ = new PricingStructureReference(forecastCurrencyYieldCurveNode);
             }
         }
         else
         {
             forecastCurrencyYieldCurve_ = new PricingStructureReference(forecastCurrencyYieldCurveNode);
         }
     }
     
 
     XmlNode spotRateNode = xmlNode.SelectSingleNode("spotRate");
     
     if (spotRateNode != null)
     {
         if (spotRateNode.Attributes["href"] != null || spotRateNode.Attributes["id"] != null) 
         {
             if (spotRateNode.Attributes["id"] != null) 
             {
                 spotRateIDRef_ = spotRateNode.Attributes["id"].Value;
                 FxRateSet ob = new FxRateSet(spotRateNode);
                 IDManager.SetID(spotRateIDRef_, ob);
             }
             else if (spotRateNode.Attributes["href"] != null)
             {
                 spotRateIDRef_ = spotRateNode.Attributes["href"].Value;
             }
             else
             {
                 spotRate_ = new FxRateSet(spotRateNode);
             }
         }
         else
         {
             spotRate_ = new FxRateSet(spotRateNode);
         }
     }
     
 
     XmlNode fxForwardCurveNode = xmlNode.SelectSingleNode("fxForwardCurve");
     
     if (fxForwardCurveNode != null)
     {
         if (fxForwardCurveNode.Attributes["href"] != null || fxForwardCurveNode.Attributes["id"] != null) 
         {
             if (fxForwardCurveNode.Attributes["id"] != null) 
             {
                 fxForwardCurveIDRef_ = fxForwardCurveNode.Attributes["id"].Value;
                 TermCurve ob = new TermCurve(fxForwardCurveNode);
                 IDManager.SetID(fxForwardCurveIDRef_, ob);
             }
             else if (fxForwardCurveNode.Attributes["href"] != null)
             {
                 fxForwardCurveIDRef_ = fxForwardCurveNode.Attributes["href"].Value;
             }
             else
             {
                 fxForwardCurve_ = new TermCurve(fxForwardCurveNode);
             }
         }
         else
         {
             fxForwardCurve_ = new TermCurve(fxForwardCurveNode);
         }
     }
     
 
     XmlNode fxForwardPointsCurveNode = xmlNode.SelectSingleNode("fxForwardPointsCurve");
     
     if (fxForwardPointsCurveNode != null)
     {
         if (fxForwardPointsCurveNode.Attributes["href"] != null || fxForwardPointsCurveNode.Attributes["id"] != null) 
         {
             if (fxForwardPointsCurveNode.Attributes["id"] != null) 
             {
                 fxForwardPointsCurveIDRef_ = fxForwardPointsCurveNode.Attributes["id"].Value;
                 TermCurve ob = new TermCurve(fxForwardPointsCurveNode);
                 IDManager.SetID(fxForwardPointsCurveIDRef_, ob);
             }
             else if (fxForwardPointsCurveNode.Attributes["href"] != null)
             {
                 fxForwardPointsCurveIDRef_ = fxForwardPointsCurveNode.Attributes["href"].Value;
             }
             else
             {
                 fxForwardPointsCurve_ = new TermCurve(fxForwardPointsCurveNode);
             }
         }
         else
         {
             fxForwardPointsCurve_ = new TermCurve(fxForwardPointsCurveNode);
         }
     }
     
 
 }
Ejemplo n.º 4
0
        public FxCurveValuation(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList settlementCurrencyYieldCurveNodeList = xmlNode.SelectNodes("settlementCurrencyYieldCurve");

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

            foreach (XmlNode item in settlementCurrencyYieldCurveNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementCurrencyYieldCurveIDRef = item.Attributes["id"].Name;
                        PricingStructureReference ob = PricingStructureReference();
                        IDManager.SetID(settlementCurrencyYieldCurveIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementCurrencyYieldCurveIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementCurrencyYieldCurve = new PricingStructureReference(item);
                    }
                }
            }


            XmlNodeList forecastCurrencyYieldCurveNodeList = xmlNode.SelectNodes("forecastCurrencyYieldCurve");

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

            foreach (XmlNode item in forecastCurrencyYieldCurveNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        forecastCurrencyYieldCurveIDRef = item.Attributes["id"].Name;
                        PricingStructureReference ob = PricingStructureReference();
                        IDManager.SetID(forecastCurrencyYieldCurveIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        forecastCurrencyYieldCurveIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        forecastCurrencyYieldCurve = new PricingStructureReference(item);
                    }
                }
            }


            XmlNodeList spotRateNodeList = xmlNode.SelectNodes("spotRate");

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

            foreach (XmlNode item in spotRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        spotRateIDRef = item.Attributes["id"].Name;
                        FxRateSet ob = FxRateSet();
                        IDManager.SetID(spotRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        spotRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        spotRate = new FxRateSet(item);
                    }
                }
            }


            XmlNodeList fxForwardCurveNodeList = xmlNode.SelectNodes("fxForwardCurve");

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

            foreach (XmlNode item in fxForwardCurveNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fxForwardCurveIDRef = item.Attributes["id"].Name;
                        TermCurve ob = TermCurve();
                        IDManager.SetID(fxForwardCurveIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fxForwardCurveIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fxForwardCurve = new TermCurve(item);
                    }
                }
            }


            XmlNodeList fxForwardPointsCurveNodeList = xmlNode.SelectNodes("fxForwardPointsCurve");

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

            foreach (XmlNode item in fxForwardPointsCurveNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fxForwardPointsCurveIDRef = item.Attributes["id"].Name;
                        TermCurve ob = TermCurve();
                        IDManager.SetID(fxForwardPointsCurveIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fxForwardPointsCurveIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fxForwardPointsCurve = new TermCurve(item);
                    }
                }
            }
        }