Пример #1
0
        public IndexTimeRef(XmlNode xmlNode)
        {
            XmlNodeList underlyingIndexRefNodeList = xmlNode.SelectNodes("underlyingIndexRef");

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

            foreach (XmlNode item in underlyingIndexRefNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        underlyingIndexRefIDRef = item.Attributes["id"].Name;
                        UnderlyingIndex ob = UnderlyingIndex();
                        IDManager.SetID(underlyingIndexRefIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        underlyingIndexRefIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        underlyingIndexRef = new UnderlyingIndex(item);
                    }
                }
            }


            XmlNodeList fixingDaysNodeList = xmlNode.SelectNodes("fixingDays");

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

            foreach (XmlNode item in fixingDaysNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingDaysIDRef = item.Attributes["id"].Name;
                        FixingDays ob = FixingDays();
                        IDManager.SetID(fixingDaysIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingDaysIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingDays = new FixingDays(item);
                    }
                }
            }
        }
 public IndexTimeRef(XmlNode xmlNode)
 {
     XmlNode underlyingIndexRefNode = xmlNode.SelectSingleNode("underlyingIndexRef");
     
     if (underlyingIndexRefNode != null)
     {
         if (underlyingIndexRefNode.Attributes["href"] != null || underlyingIndexRefNode.Attributes["id"] != null) 
         {
             if (underlyingIndexRefNode.Attributes["id"] != null) 
             {
                 underlyingIndexRefIDRef_ = underlyingIndexRefNode.Attributes["id"].Value;
                 UnderlyingIndex ob = new UnderlyingIndex(underlyingIndexRefNode);
                 IDManager.SetID(underlyingIndexRefIDRef_, ob);
             }
             else if (underlyingIndexRefNode.Attributes["href"] != null)
             {
                 underlyingIndexRefIDRef_ = underlyingIndexRefNode.Attributes["href"].Value;
             }
             else
             {
                 underlyingIndexRef_ = new UnderlyingIndex(underlyingIndexRefNode);
             }
         }
         else
         {
             underlyingIndexRef_ = new UnderlyingIndex(underlyingIndexRefNode);
         }
     }
     
 
     XmlNode fixingDaysNode = xmlNode.SelectSingleNode("fixingDays");
     
     if (fixingDaysNode != null)
     {
         if (fixingDaysNode.Attributes["href"] != null || fixingDaysNode.Attributes["id"] != null) 
         {
             if (fixingDaysNode.Attributes["id"] != null) 
             {
                 fixingDaysIDRef_ = fixingDaysNode.Attributes["id"].Value;
                 FixingDays ob = new FixingDays(fixingDaysNode);
                 IDManager.SetID(fixingDaysIDRef_, ob);
             }
             else if (fixingDaysNode.Attributes["href"] != null)
             {
                 fixingDaysIDRef_ = fixingDaysNode.Attributes["href"].Value;
             }
             else
             {
                 fixingDays_ = new FixingDays(fixingDaysNode);
             }
         }
         else
         {
             fixingDays_ = new FixingDays(fixingDaysNode);
         }
     }
     
 
 }
Пример #3
0
        public IndexTimeRef(XmlNode xmlNode)
        {
            XmlNode underlyingIndexRefNode = xmlNode.SelectSingleNode("underlyingIndexRef");

            if (underlyingIndexRefNode != null)
            {
                if (underlyingIndexRefNode.Attributes["href"] != null || underlyingIndexRefNode.Attributes["id"] != null)
                {
                    if (underlyingIndexRefNode.Attributes["id"] != null)
                    {
                        underlyingIndexRefIDRef_ = underlyingIndexRefNode.Attributes["id"].Value;
                        UnderlyingIndex ob = new UnderlyingIndex(underlyingIndexRefNode);
                        IDManager.SetID(underlyingIndexRefIDRef_, ob);
                    }
                    else if (underlyingIndexRefNode.Attributes["href"] != null)
                    {
                        underlyingIndexRefIDRef_ = underlyingIndexRefNode.Attributes["href"].Value;
                    }
                    else
                    {
                        underlyingIndexRef_ = new UnderlyingIndex(underlyingIndexRefNode);
                    }
                }
                else
                {
                    underlyingIndexRef_ = new UnderlyingIndex(underlyingIndexRefNode);
                }
            }


            XmlNode fixingDaysNode = xmlNode.SelectSingleNode("fixingDays");

            if (fixingDaysNode != null)
            {
                if (fixingDaysNode.Attributes["href"] != null || fixingDaysNode.Attributes["id"] != null)
                {
                    if (fixingDaysNode.Attributes["id"] != null)
                    {
                        fixingDaysIDRef_ = fixingDaysNode.Attributes["id"].Value;
                        FixingDays ob = new FixingDays(fixingDaysNode);
                        IDManager.SetID(fixingDaysIDRef_, ob);
                    }
                    else if (fixingDaysNode.Attributes["href"] != null)
                    {
                        fixingDaysIDRef_ = fixingDaysNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingDays_ = new FixingDays(fixingDaysNode);
                    }
                }
                else
                {
                    fixingDays_ = new FixingDays(fixingDaysNode);
                }
            }
        }
 public IndexRef(XmlNode xmlNode)
 {
     XmlNodeList underlyingIndexRefNodeList = xmlNode.SelectNodes("underlyingIndexRef");
     if (underlyingIndexRefNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in underlyingIndexRefNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 underlyingIndexRefIDRef = item.Attributes["id"].Name;
                 UnderlyingIndex ob = UnderlyingIndex();
                 IDManager.SetID(underlyingIndexRefIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 underlyingIndexRefIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 underlyingIndexRef = new UnderlyingIndex(item);
             }
         }
     }
     
 
     XmlNodeList eventDateRefNodeList = xmlNode.SelectNodes("eventDateRef");
     if (eventDateRefNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in eventDateRefNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 eventDateRefIDRef = item.Attributes["id"].Name;
                 EventDate ob = EventDate();
                 IDManager.SetID(eventDateRefIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 eventDateRefIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 eventDateRef = new EventDate(item);
             }
         }
     }
     
 
     XmlNodeList fixingDaysNodeList = xmlNode.SelectNodes("fixingDays");
     if (fixingDaysNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingDaysNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingDaysIDRef = item.Attributes["id"].Name;
                 FixingDays ob = FixingDays();
                 IDManager.SetID(fixingDaysIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingDaysIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingDays = new FixingDays(item);
             }
         }
     }
     
 
 }