public CreditDefaultSwapOption(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList strikeNodeList = xmlNode.SelectNodes("strike");
     if (strikeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in strikeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 strikeIDRef = item.Attributes["id"].Name;
                 CreditOptionStrike ob = CreditOptionStrike();
                 IDManager.SetID(strikeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 strikeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 strike = new CreditOptionStrike(item);
             }
         }
     }
     
 
     XmlNodeList creditDefaultSwapNodeList = xmlNode.SelectNodes("creditDefaultSwap");
     if (creditDefaultSwapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditDefaultSwapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditDefaultSwapIDRef = item.Attributes["id"].Name;
                 CreditDefaultSwap ob = CreditDefaultSwap();
                 IDManager.SetID(creditDefaultSwapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditDefaultSwapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditDefaultSwap = new CreditDefaultSwap(item);
             }
         }
     }
     
 
 }
 public CreditDefaultSwapOption(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode strikeNode = xmlNode.SelectSingleNode("strike");
     
     if (strikeNode != null)
     {
         if (strikeNode.Attributes["href"] != null || strikeNode.Attributes["id"] != null) 
         {
             if (strikeNode.Attributes["id"] != null) 
             {
                 strikeIDRef_ = strikeNode.Attributes["id"].Value;
                 CreditOptionStrike ob = new CreditOptionStrike(strikeNode);
                 IDManager.SetID(strikeIDRef_, ob);
             }
             else if (strikeNode.Attributes["href"] != null)
             {
                 strikeIDRef_ = strikeNode.Attributes["href"].Value;
             }
             else
             {
                 strike_ = new CreditOptionStrike(strikeNode);
             }
         }
         else
         {
             strike_ = new CreditOptionStrike(strikeNode);
         }
     }
     
 
     XmlNode creditDefaultSwapNode = xmlNode.SelectSingleNode("creditDefaultSwap");
     
     if (creditDefaultSwapNode != null)
     {
         if (creditDefaultSwapNode.Attributes["href"] != null || creditDefaultSwapNode.Attributes["id"] != null) 
         {
             if (creditDefaultSwapNode.Attributes["id"] != null) 
             {
                 creditDefaultSwapIDRef_ = creditDefaultSwapNode.Attributes["id"].Value;
                 CreditDefaultSwap ob = new CreditDefaultSwap(creditDefaultSwapNode);
                 IDManager.SetID(creditDefaultSwapIDRef_, ob);
             }
             else if (creditDefaultSwapNode.Attributes["href"] != null)
             {
                 creditDefaultSwapIDRef_ = creditDefaultSwapNode.Attributes["href"].Value;
             }
             else
             {
                 creditDefaultSwap_ = new CreditDefaultSwap(creditDefaultSwapNode);
             }
         }
         else
         {
             creditDefaultSwap_ = new CreditDefaultSwap(creditDefaultSwapNode);
         }
     }
     
 
 }
        public CreditDefaultSwapOption(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList strikeNodeList = xmlNode.SelectNodes("strike");

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

            foreach (XmlNode item in strikeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        strikeIDRef = item.Attributes["id"].Name;
                        CreditOptionStrike ob = CreditOptionStrike();
                        IDManager.SetID(strikeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        strikeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        strike = new CreditOptionStrike(item);
                    }
                }
            }


            XmlNodeList creditDefaultSwapNodeList = xmlNode.SelectNodes("creditDefaultSwap");

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

            foreach (XmlNode item in creditDefaultSwapNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        creditDefaultSwapIDRef = item.Attributes["id"].Name;
                        CreditDefaultSwap ob = CreditDefaultSwap();
                        IDManager.SetID(creditDefaultSwapIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        creditDefaultSwapIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        creditDefaultSwap = new CreditDefaultSwap(item);
                    }
                }
            }
        }
Beispiel #4
0
        public CreditDefaultSwapOption(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode strikeNode = xmlNode.SelectSingleNode("strike");

            if (strikeNode != null)
            {
                if (strikeNode.Attributes["href"] != null || strikeNode.Attributes["id"] != null)
                {
                    if (strikeNode.Attributes["id"] != null)
                    {
                        strikeIDRef_ = strikeNode.Attributes["id"].Value;
                        CreditOptionStrike ob = new CreditOptionStrike(strikeNode);
                        IDManager.SetID(strikeIDRef_, ob);
                    }
                    else if (strikeNode.Attributes["href"] != null)
                    {
                        strikeIDRef_ = strikeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        strike_ = new CreditOptionStrike(strikeNode);
                    }
                }
                else
                {
                    strike_ = new CreditOptionStrike(strikeNode);
                }
            }


            XmlNode creditDefaultSwapNode = xmlNode.SelectSingleNode("creditDefaultSwap");

            if (creditDefaultSwapNode != null)
            {
                if (creditDefaultSwapNode.Attributes["href"] != null || creditDefaultSwapNode.Attributes["id"] != null)
                {
                    if (creditDefaultSwapNode.Attributes["id"] != null)
                    {
                        creditDefaultSwapIDRef_ = creditDefaultSwapNode.Attributes["id"].Value;
                        CreditDefaultSwap ob = new CreditDefaultSwap(creditDefaultSwapNode);
                        IDManager.SetID(creditDefaultSwapIDRef_, ob);
                    }
                    else if (creditDefaultSwapNode.Attributes["href"] != null)
                    {
                        creditDefaultSwapIDRef_ = creditDefaultSwapNode.Attributes["href"].Value;
                    }
                    else
                    {
                        creditDefaultSwap_ = new CreditDefaultSwap(creditDefaultSwapNode);
                    }
                }
                else
                {
                    creditDefaultSwap_ = new CreditDefaultSwap(creditDefaultSwapNode);
                }
            }
        }