public UnderlyingIndex(XmlNode xmlNode)
 {
     XmlNode stockIndexNode = xmlNode.SelectSingleNode("stockIndex");
     
     if (stockIndexNode != null)
     {
         if (stockIndexNode.Attributes["href"] != null || stockIndexNode.Attributes["id"] != null) 
         {
             if (stockIndexNode.Attributes["id"] != null) 
             {
                 stockIndexIDRef_ = stockIndexNode.Attributes["id"].Value;
                 StockIndex ob = new StockIndex(stockIndexNode);
                 IDManager.SetID(stockIndexIDRef_, ob);
             }
             else if (stockIndexNode.Attributes["href"] != null)
             {
                 stockIndexIDRef_ = stockIndexNode.Attributes["href"].Value;
             }
             else
             {
                 stockIndex_ = new StockIndex(stockIndexNode);
             }
         }
         else
         {
             stockIndex_ = new StockIndex(stockIndexNode);
         }
     }
     
 
     XmlNode interestrateIndexNode = xmlNode.SelectSingleNode("interestrateIndex");
     
     if (interestrateIndexNode != null)
     {
         if (interestrateIndexNode.Attributes["href"] != null || interestrateIndexNode.Attributes["id"] != null) 
         {
             if (interestrateIndexNode.Attributes["id"] != null) 
             {
                 interestrateIndexIDRef_ = interestrateIndexNode.Attributes["id"].Value;
                 InterestrateIndex ob = new InterestrateIndex(interestrateIndexNode);
                 IDManager.SetID(interestrateIndexIDRef_, ob);
             }
             else if (interestrateIndexNode.Attributes["href"] != null)
             {
                 interestrateIndexIDRef_ = interestrateIndexNode.Attributes["href"].Value;
             }
             else
             {
                 interestrateIndex_ = new InterestrateIndex(interestrateIndexNode);
             }
         }
         else
         {
             interestrateIndex_ = new InterestrateIndex(interestrateIndexNode);
         }
     }
     
 
     XmlNode commodityIndexNode = xmlNode.SelectSingleNode("commodityIndex");
     
     if (commodityIndexNode != null)
     {
         if (commodityIndexNode.Attributes["href"] != null || commodityIndexNode.Attributes["id"] != null) 
         {
             if (commodityIndexNode.Attributes["id"] != null) 
             {
                 commodityIndexIDRef_ = commodityIndexNode.Attributes["id"].Value;
                 CommodityIndex ob = new CommodityIndex(commodityIndexNode);
                 IDManager.SetID(commodityIndexIDRef_, ob);
             }
             else if (commodityIndexNode.Attributes["href"] != null)
             {
                 commodityIndexIDRef_ = commodityIndexNode.Attributes["href"].Value;
             }
             else
             {
                 commodityIndex_ = new CommodityIndex(commodityIndexNode);
             }
         }
         else
         {
             commodityIndex_ = new CommodityIndex(commodityIndexNode);
         }
     }
     
 
 }
        public UnderlyingIndex(XmlNode xmlNode)
        {
            XmlNodeList stockIndexNodeList = xmlNode.SelectNodes("stockIndex");

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

            foreach (XmlNode item in stockIndexNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        stockIndexIDRef = item.Attributes["id"].Name;
                        StockIndex ob = StockIndex();
                        IDManager.SetID(stockIndexIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        stockIndexIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        stockIndex = new StockIndex(item);
                    }
                }
            }


            XmlNodeList interestrateIndexNodeList = xmlNode.SelectNodes("interestrateIndex");

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

            foreach (XmlNode item in interestrateIndexNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        interestrateIndexIDRef = item.Attributes["id"].Name;
                        InterestrateIndex ob = InterestrateIndex();
                        IDManager.SetID(interestrateIndexIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        interestrateIndexIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        interestrateIndex = new InterestrateIndex(item);
                    }
                }
            }


            XmlNodeList commodityIndexNodeList = xmlNode.SelectNodes("commodityIndex");

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

            foreach (XmlNode item in commodityIndexNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        commodityIndexIDRef = item.Attributes["id"].Name;
                        CommodityIndex ob = CommodityIndex();
                        IDManager.SetID(commodityIndexIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        commodityIndexIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        commodityIndex = new CommodityIndex(item);
                    }
                }
            }
        }
 public UnderlyingIndex(XmlNode xmlNode)
 {
     XmlNodeList stockIndexNodeList = xmlNode.SelectNodes("stockIndex");
     if (stockIndexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in stockIndexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 stockIndexIDRef = item.Attributes["id"].Name;
                 StockIndex ob = StockIndex();
                 IDManager.SetID(stockIndexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 stockIndexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 stockIndex = new StockIndex(item);
             }
         }
     }
     
 
     XmlNodeList interestrateIndexNodeList = xmlNode.SelectNodes("interestrateIndex");
     if (interestrateIndexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interestrateIndexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interestrateIndexIDRef = item.Attributes["id"].Name;
                 InterestrateIndex ob = InterestrateIndex();
                 IDManager.SetID(interestrateIndexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interestrateIndexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interestrateIndex = new InterestrateIndex(item);
             }
         }
     }
     
 
     XmlNodeList commodityIndexNodeList = xmlNode.SelectNodes("commodityIndex");
     if (commodityIndexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityIndexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityIndexIDRef = item.Attributes["id"].Name;
                 CommodityIndex ob = CommodityIndex();
                 IDManager.SetID(commodityIndexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityIndexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodityIndex = new CommodityIndex(item);
             }
         }
     }
     
 
 }
Пример #4
0
        public UnderlyingIndex(XmlNode xmlNode)
        {
            XmlNode stockIndexNode = xmlNode.SelectSingleNode("stockIndex");

            if (stockIndexNode != null)
            {
                if (stockIndexNode.Attributes["href"] != null || stockIndexNode.Attributes["id"] != null)
                {
                    if (stockIndexNode.Attributes["id"] != null)
                    {
                        stockIndexIDRef_ = stockIndexNode.Attributes["id"].Value;
                        StockIndex ob = new StockIndex(stockIndexNode);
                        IDManager.SetID(stockIndexIDRef_, ob);
                    }
                    else if (stockIndexNode.Attributes["href"] != null)
                    {
                        stockIndexIDRef_ = stockIndexNode.Attributes["href"].Value;
                    }
                    else
                    {
                        stockIndex_ = new StockIndex(stockIndexNode);
                    }
                }
                else
                {
                    stockIndex_ = new StockIndex(stockIndexNode);
                }
            }


            XmlNode interestrateIndexNode = xmlNode.SelectSingleNode("interestrateIndex");

            if (interestrateIndexNode != null)
            {
                if (interestrateIndexNode.Attributes["href"] != null || interestrateIndexNode.Attributes["id"] != null)
                {
                    if (interestrateIndexNode.Attributes["id"] != null)
                    {
                        interestrateIndexIDRef_ = interestrateIndexNode.Attributes["id"].Value;
                        InterestrateIndex ob = new InterestrateIndex(interestrateIndexNode);
                        IDManager.SetID(interestrateIndexIDRef_, ob);
                    }
                    else if (interestrateIndexNode.Attributes["href"] != null)
                    {
                        interestrateIndexIDRef_ = interestrateIndexNode.Attributes["href"].Value;
                    }
                    else
                    {
                        interestrateIndex_ = new InterestrateIndex(interestrateIndexNode);
                    }
                }
                else
                {
                    interestrateIndex_ = new InterestrateIndex(interestrateIndexNode);
                }
            }


            XmlNode commodityIndexNode = xmlNode.SelectSingleNode("commodityIndex");

            if (commodityIndexNode != null)
            {
                if (commodityIndexNode.Attributes["href"] != null || commodityIndexNode.Attributes["id"] != null)
                {
                    if (commodityIndexNode.Attributes["id"] != null)
                    {
                        commodityIndexIDRef_ = commodityIndexNode.Attributes["id"].Value;
                        CommodityIndex ob = new CommodityIndex(commodityIndexNode);
                        IDManager.SetID(commodityIndexIDRef_, ob);
                    }
                    else if (commodityIndexNode.Attributes["href"] != null)
                    {
                        commodityIndexIDRef_ = commodityIndexNode.Attributes["href"].Value;
                    }
                    else
                    {
                        commodityIndex_ = new CommodityIndex(commodityIndexNode);
                    }
                }
                else
                {
                    commodityIndex_ = new CommodityIndex(commodityIndexNode);
                }
            }
        }