public StrategyFeature(XmlNode xmlNode)
 {
     XmlNodeList strikeSpreadNodeList = xmlNode.SelectNodes("strikeSpread");
     if (strikeSpreadNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in strikeSpreadNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 strikeSpreadIDRef = item.Attributes["id"].Name;
                 StrikeSpread ob = StrikeSpread();
                 IDManager.SetID(strikeSpreadIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 strikeSpreadIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 strikeSpread = new StrikeSpread(item);
             }
         }
     }
     
 
     XmlNodeList calendarSpreadNodeList = xmlNode.SelectNodes("calendarSpread");
     if (calendarSpreadNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calendarSpreadNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calendarSpreadIDRef = item.Attributes["id"].Name;
                 CalendarSpread ob = CalendarSpread();
                 IDManager.SetID(calendarSpreadIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calendarSpreadIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calendarSpread = new CalendarSpread(item);
             }
         }
     }
     
 
 }
示例#2
0
        public StrategyFeature(XmlNode xmlNode)
        {
            XmlNodeList strikeSpreadNodeList = xmlNode.SelectNodes("strikeSpread");

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

            foreach (XmlNode item in strikeSpreadNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        strikeSpreadIDRef = item.Attributes["id"].Name;
                        StrikeSpread ob = StrikeSpread();
                        IDManager.SetID(strikeSpreadIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        strikeSpreadIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        strikeSpread = new StrikeSpread(item);
                    }
                }
            }


            XmlNodeList calendarSpreadNodeList = xmlNode.SelectNodes("calendarSpread");

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

            foreach (XmlNode item in calendarSpreadNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calendarSpreadIDRef = item.Attributes["id"].Name;
                        CalendarSpread ob = CalendarSpread();
                        IDManager.SetID(calendarSpreadIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calendarSpreadIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calendarSpread = new CalendarSpread(item);
                    }
                }
            }
        }
 public StrategyFeature(XmlNode xmlNode)
 {
     XmlNode strikeSpreadNode = xmlNode.SelectSingleNode("strikeSpread");
     
     if (strikeSpreadNode != null)
     {
         if (strikeSpreadNode.Attributes["href"] != null || strikeSpreadNode.Attributes["id"] != null) 
         {
             if (strikeSpreadNode.Attributes["id"] != null) 
             {
                 strikeSpreadIDRef_ = strikeSpreadNode.Attributes["id"].Value;
                 StrikeSpread ob = new StrikeSpread(strikeSpreadNode);
                 IDManager.SetID(strikeSpreadIDRef_, ob);
             }
             else if (strikeSpreadNode.Attributes["href"] != null)
             {
                 strikeSpreadIDRef_ = strikeSpreadNode.Attributes["href"].Value;
             }
             else
             {
                 strikeSpread_ = new StrikeSpread(strikeSpreadNode);
             }
         }
         else
         {
             strikeSpread_ = new StrikeSpread(strikeSpreadNode);
         }
     }
     
 
     XmlNode calendarSpreadNode = xmlNode.SelectSingleNode("calendarSpread");
     
     if (calendarSpreadNode != null)
     {
         if (calendarSpreadNode.Attributes["href"] != null || calendarSpreadNode.Attributes["id"] != null) 
         {
             if (calendarSpreadNode.Attributes["id"] != null) 
             {
                 calendarSpreadIDRef_ = calendarSpreadNode.Attributes["id"].Value;
                 CalendarSpread ob = new CalendarSpread(calendarSpreadNode);
                 IDManager.SetID(calendarSpreadIDRef_, ob);
             }
             else if (calendarSpreadNode.Attributes["href"] != null)
             {
                 calendarSpreadIDRef_ = calendarSpreadNode.Attributes["href"].Value;
             }
             else
             {
                 calendarSpread_ = new CalendarSpread(calendarSpreadNode);
             }
         }
         else
         {
             calendarSpread_ = new CalendarSpread(calendarSpreadNode);
         }
     }
     
 
 }
        public StrategyFeature(XmlNode xmlNode)
        {
            XmlNode strikeSpreadNode = xmlNode.SelectSingleNode("strikeSpread");

            if (strikeSpreadNode != null)
            {
                if (strikeSpreadNode.Attributes["href"] != null || strikeSpreadNode.Attributes["id"] != null)
                {
                    if (strikeSpreadNode.Attributes["id"] != null)
                    {
                        strikeSpreadIDRef_ = strikeSpreadNode.Attributes["id"].Value;
                        StrikeSpread ob = new StrikeSpread(strikeSpreadNode);
                        IDManager.SetID(strikeSpreadIDRef_, ob);
                    }
                    else if (strikeSpreadNode.Attributes["href"] != null)
                    {
                        strikeSpreadIDRef_ = strikeSpreadNode.Attributes["href"].Value;
                    }
                    else
                    {
                        strikeSpread_ = new StrikeSpread(strikeSpreadNode);
                    }
                }
                else
                {
                    strikeSpread_ = new StrikeSpread(strikeSpreadNode);
                }
            }


            XmlNode calendarSpreadNode = xmlNode.SelectSingleNode("calendarSpread");

            if (calendarSpreadNode != null)
            {
                if (calendarSpreadNode.Attributes["href"] != null || calendarSpreadNode.Attributes["id"] != null)
                {
                    if (calendarSpreadNode.Attributes["id"] != null)
                    {
                        calendarSpreadIDRef_ = calendarSpreadNode.Attributes["id"].Value;
                        CalendarSpread ob = new CalendarSpread(calendarSpreadNode);
                        IDManager.SetID(calendarSpreadIDRef_, ob);
                    }
                    else if (calendarSpreadNode.Attributes["href"] != null)
                    {
                        calendarSpreadIDRef_ = calendarSpreadNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calendarSpread_ = new CalendarSpread(calendarSpreadNode);
                    }
                }
                else
                {
                    calendarSpread_ = new CalendarSpread(calendarSpreadNode);
                }
            }
        }