public QuotedAssetSet(XmlNode xmlNode)
 {
     XmlNodeList instrumentSetNodeList = xmlNode.SelectNodes("instrumentSet");
     if (instrumentSetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in instrumentSetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 instrumentSetIDRef = item.Attributes["id"].Name;
                 InstrumentSet ob = InstrumentSet();
                 IDManager.SetID(instrumentSetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 instrumentSetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 instrumentSet = new InstrumentSet(item);
             }
         }
     }
     
 
     XmlNodeList assetQuoteNodeList = xmlNode.SelectNodes("assetQuote");
     
     foreach (XmlNode item in assetQuoteNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 assetQuoteIDRef = item.Attributes["id"].Name;
                 List<BasicAssetValuation> ob = new List<BasicAssetValuation>();
                 ob.Add(new BasicAssetValuation(item));
                 IDManager.SetID(assetQuoteIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 assetQuoteIDRef = item.Attributes["href"].Name;
             }
             else
             {
             assetQuote.Add(new BasicAssetValuation(item));
             }
         }
     }
     
 
 }
Ejemplo n.º 2
0
        public QuotedAssetSet(XmlNode xmlNode)
        {
            XmlNodeList instrumentSetNodeList = xmlNode.SelectNodes("instrumentSet");

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

            foreach (XmlNode item in instrumentSetNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        instrumentSetIDRef = item.Attributes["id"].Name;
                        InstrumentSet ob = InstrumentSet();
                        IDManager.SetID(instrumentSetIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        instrumentSetIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        instrumentSet = new InstrumentSet(item);
                    }
                }
            }


            XmlNodeList assetQuoteNodeList = xmlNode.SelectNodes("assetQuote");

            foreach (XmlNode item in assetQuoteNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        assetQuoteIDRef = item.Attributes["id"].Name;
                        List <BasicAssetValuation> ob = new List <BasicAssetValuation>();
                        ob.Add(new BasicAssetValuation(item));
                        IDManager.SetID(assetQuoteIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        assetQuoteIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        assetQuote.Add(new BasicAssetValuation(item));
                    }
                }
            }
        }
 public QuotedAssetSet(XmlNode xmlNode)
 {
     XmlNode instrumentSetNode = xmlNode.SelectSingleNode("instrumentSet");
     
     if (instrumentSetNode != null)
     {
         if (instrumentSetNode.Attributes["href"] != null || instrumentSetNode.Attributes["id"] != null) 
         {
             if (instrumentSetNode.Attributes["id"] != null) 
             {
                 instrumentSetIDRef_ = instrumentSetNode.Attributes["id"].Value;
                 InstrumentSet ob = new InstrumentSet(instrumentSetNode);
                 IDManager.SetID(instrumentSetIDRef_, ob);
             }
             else if (instrumentSetNode.Attributes["href"] != null)
             {
                 instrumentSetIDRef_ = instrumentSetNode.Attributes["href"].Value;
             }
             else
             {
                 instrumentSet_ = new InstrumentSet(instrumentSetNode);
             }
         }
         else
         {
             instrumentSet_ = new InstrumentSet(instrumentSetNode);
         }
     }
     
 
     XmlNodeList assetQuoteNodeList = xmlNode.SelectNodes("assetQuote");
     
     if (assetQuoteNodeList != null)
     {
         this.assetQuote_ = new List<BasicAssetValuation>();
         foreach (XmlNode item in assetQuoteNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     assetQuoteIDRef_ = item.Attributes["id"].Value;
                     assetQuote_.Add(new BasicAssetValuation(item));
                     IDManager.SetID(assetQuoteIDRef_, assetQuote_[assetQuote_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     assetQuoteIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 assetQuote_.Add(new BasicAssetValuation(item));
                 }
             }
             else
             {
                 assetQuote_.Add(new BasicAssetValuation(item));
             }
         }
     }
     
 
 }
        public QuotedAssetSet(XmlNode xmlNode)
        {
            XmlNode instrumentSetNode = xmlNode.SelectSingleNode("instrumentSet");

            if (instrumentSetNode != null)
            {
                if (instrumentSetNode.Attributes["href"] != null || instrumentSetNode.Attributes["id"] != null)
                {
                    if (instrumentSetNode.Attributes["id"] != null)
                    {
                        instrumentSetIDRef_ = instrumentSetNode.Attributes["id"].Value;
                        InstrumentSet ob = new InstrumentSet(instrumentSetNode);
                        IDManager.SetID(instrumentSetIDRef_, ob);
                    }
                    else if (instrumentSetNode.Attributes["href"] != null)
                    {
                        instrumentSetIDRef_ = instrumentSetNode.Attributes["href"].Value;
                    }
                    else
                    {
                        instrumentSet_ = new InstrumentSet(instrumentSetNode);
                    }
                }
                else
                {
                    instrumentSet_ = new InstrumentSet(instrumentSetNode);
                }
            }


            XmlNodeList assetQuoteNodeList = xmlNode.SelectNodes("assetQuote");

            if (assetQuoteNodeList != null)
            {
                this.assetQuote_ = new List <BasicAssetValuation>();
                foreach (XmlNode item in assetQuoteNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            assetQuoteIDRef_ = item.Attributes["id"].Value;
                            assetQuote_.Add(new BasicAssetValuation(item));
                            IDManager.SetID(assetQuoteIDRef_, assetQuote_[assetQuote_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            assetQuoteIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            assetQuote_.Add(new BasicAssetValuation(item));
                        }
                    }
                    else
                    {
                        assetQuote_.Add(new BasicAssetValuation(item));
                    }
                }
            }
        }