예제 #1
0
        public ReferenceSwapCurve(XmlNode xmlNode)
        {
            XmlNodeList swapUnwindValueNodeList = xmlNode.SelectNodes("swapUnwindValue");

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

            foreach (XmlNode item in swapUnwindValueNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        swapUnwindValueIDRef = item.Attributes["id"].Name;
                        SwapCurveValuation ob = SwapCurveValuation();
                        IDManager.SetID(swapUnwindValueIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        swapUnwindValueIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        swapUnwindValue = new SwapCurveValuation(item);
                    }
                }
            }


            XmlNodeList makeWholeAmountNodeList = xmlNode.SelectNodes("makeWholeAmount");

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

            foreach (XmlNode item in makeWholeAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        makeWholeAmountIDRef = item.Attributes["id"].Name;
                        MakeWholeAmount ob = MakeWholeAmount();
                        IDManager.SetID(makeWholeAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        makeWholeAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        makeWholeAmount = new MakeWholeAmount(item);
                    }
                }
            }
        }
 public ReferenceSwapCurve(XmlNode xmlNode)
 {
     XmlNode swapUnwindValueNode = xmlNode.SelectSingleNode("swapUnwindValue");
     
     if (swapUnwindValueNode != null)
     {
         if (swapUnwindValueNode.Attributes["href"] != null || swapUnwindValueNode.Attributes["id"] != null) 
         {
             if (swapUnwindValueNode.Attributes["id"] != null) 
             {
                 swapUnwindValueIDRef_ = swapUnwindValueNode.Attributes["id"].Value;
                 SwapCurveValuation ob = new SwapCurveValuation(swapUnwindValueNode);
                 IDManager.SetID(swapUnwindValueIDRef_, ob);
             }
             else if (swapUnwindValueNode.Attributes["href"] != null)
             {
                 swapUnwindValueIDRef_ = swapUnwindValueNode.Attributes["href"].Value;
             }
             else
             {
                 swapUnwindValue_ = new SwapCurveValuation(swapUnwindValueNode);
             }
         }
         else
         {
             swapUnwindValue_ = new SwapCurveValuation(swapUnwindValueNode);
         }
     }
     
 
     XmlNode makeWholeAmountNode = xmlNode.SelectSingleNode("makeWholeAmount");
     
     if (makeWholeAmountNode != null)
     {
         if (makeWholeAmountNode.Attributes["href"] != null || makeWholeAmountNode.Attributes["id"] != null) 
         {
             if (makeWholeAmountNode.Attributes["id"] != null) 
             {
                 makeWholeAmountIDRef_ = makeWholeAmountNode.Attributes["id"].Value;
                 MakeWholeAmount ob = new MakeWholeAmount(makeWholeAmountNode);
                 IDManager.SetID(makeWholeAmountIDRef_, ob);
             }
             else if (makeWholeAmountNode.Attributes["href"] != null)
             {
                 makeWholeAmountIDRef_ = makeWholeAmountNode.Attributes["href"].Value;
             }
             else
             {
                 makeWholeAmount_ = new MakeWholeAmount(makeWholeAmountNode);
             }
         }
         else
         {
             makeWholeAmount_ = new MakeWholeAmount(makeWholeAmountNode);
         }
     }
     
 
 }
 public ReferenceSwapCurve(XmlNode xmlNode)
 {
     XmlNodeList swapUnwindValueNodeList = xmlNode.SelectNodes("swapUnwindValue");
     if (swapUnwindValueNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in swapUnwindValueNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 swapUnwindValueIDRef = item.Attributes["id"].Name;
                 SwapCurveValuation ob = SwapCurveValuation();
                 IDManager.SetID(swapUnwindValueIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 swapUnwindValueIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 swapUnwindValue = new SwapCurveValuation(item);
             }
         }
     }
     
 
     XmlNodeList makeWholeAmountNodeList = xmlNode.SelectNodes("makeWholeAmount");
     if (makeWholeAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in makeWholeAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 makeWholeAmountIDRef = item.Attributes["id"].Name;
                 MakeWholeAmount ob = MakeWholeAmount();
                 IDManager.SetID(makeWholeAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 makeWholeAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 makeWholeAmount = new MakeWholeAmount(item);
             }
         }
     }
     
 
 }
예제 #4
0
        public ReferenceSwapCurve(XmlNode xmlNode)
        {
            XmlNode swapUnwindValueNode = xmlNode.SelectSingleNode("swapUnwindValue");

            if (swapUnwindValueNode != null)
            {
                if (swapUnwindValueNode.Attributes["href"] != null || swapUnwindValueNode.Attributes["id"] != null)
                {
                    if (swapUnwindValueNode.Attributes["id"] != null)
                    {
                        swapUnwindValueIDRef_ = swapUnwindValueNode.Attributes["id"].Value;
                        SwapCurveValuation ob = new SwapCurveValuation(swapUnwindValueNode);
                        IDManager.SetID(swapUnwindValueIDRef_, ob);
                    }
                    else if (swapUnwindValueNode.Attributes["href"] != null)
                    {
                        swapUnwindValueIDRef_ = swapUnwindValueNode.Attributes["href"].Value;
                    }
                    else
                    {
                        swapUnwindValue_ = new SwapCurveValuation(swapUnwindValueNode);
                    }
                }
                else
                {
                    swapUnwindValue_ = new SwapCurveValuation(swapUnwindValueNode);
                }
            }


            XmlNode makeWholeAmountNode = xmlNode.SelectSingleNode("makeWholeAmount");

            if (makeWholeAmountNode != null)
            {
                if (makeWholeAmountNode.Attributes["href"] != null || makeWholeAmountNode.Attributes["id"] != null)
                {
                    if (makeWholeAmountNode.Attributes["id"] != null)
                    {
                        makeWholeAmountIDRef_ = makeWholeAmountNode.Attributes["id"].Value;
                        MakeWholeAmount ob = new MakeWholeAmount(makeWholeAmountNode);
                        IDManager.SetID(makeWholeAmountIDRef_, ob);
                    }
                    else if (makeWholeAmountNode.Attributes["href"] != null)
                    {
                        makeWholeAmountIDRef_ = makeWholeAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        makeWholeAmount_ = new MakeWholeAmount(makeWholeAmountNode);
                    }
                }
                else
                {
                    makeWholeAmount_ = new MakeWholeAmount(makeWholeAmountNode);
                }
            }
        }