public TradeChangeContent(XmlNode xmlNode)
 {
     XmlNode oldTradeIdentifierNode = xmlNode.SelectSingleNode("oldTradeIdentifier");
     
     if (oldTradeIdentifierNode != null)
     {
         if (oldTradeIdentifierNode.Attributes["href"] != null || oldTradeIdentifierNode.Attributes["id"] != null) 
         {
             if (oldTradeIdentifierNode.Attributes["id"] != null) 
             {
                 oldTradeIdentifierIDRef_ = oldTradeIdentifierNode.Attributes["id"].Value;
                 PartyTradeIdentifier ob = new PartyTradeIdentifier(oldTradeIdentifierNode);
                 IDManager.SetID(oldTradeIdentifierIDRef_, ob);
             }
             else if (oldTradeIdentifierNode.Attributes["href"] != null)
             {
                 oldTradeIdentifierIDRef_ = oldTradeIdentifierNode.Attributes["href"].Value;
             }
             else
             {
                 oldTradeIdentifier_ = new PartyTradeIdentifier(oldTradeIdentifierNode);
             }
         }
         else
         {
             oldTradeIdentifier_ = new PartyTradeIdentifier(oldTradeIdentifierNode);
         }
     }
     
 
     XmlNode oldTradeNode = xmlNode.SelectSingleNode("oldTrade");
     
     if (oldTradeNode != null)
     {
         if (oldTradeNode.Attributes["href"] != null || oldTradeNode.Attributes["id"] != null) 
         {
             if (oldTradeNode.Attributes["id"] != null) 
             {
                 oldTradeIDRef_ = oldTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(oldTradeNode);
                 IDManager.SetID(oldTradeIDRef_, ob);
             }
             else if (oldTradeNode.Attributes["href"] != null)
             {
                 oldTradeIDRef_ = oldTradeNode.Attributes["href"].Value;
             }
             else
             {
                 oldTrade_ = new Trade(oldTradeNode);
             }
         }
         else
         {
             oldTrade_ = new Trade(oldTradeNode);
         }
     }
     
 
     XmlNode tradeNode = xmlNode.SelectSingleNode("trade");
     
     if (tradeNode != null)
     {
         if (tradeNode.Attributes["href"] != null || tradeNode.Attributes["id"] != null) 
         {
             if (tradeNode.Attributes["id"] != null) 
             {
                 tradeIDRef_ = tradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(tradeNode);
                 IDManager.SetID(tradeIDRef_, ob);
             }
             else if (tradeNode.Attributes["href"] != null)
             {
                 tradeIDRef_ = tradeNode.Attributes["href"].Value;
             }
             else
             {
                 trade_ = new Trade(tradeNode);
             }
         }
         else
         {
             trade_ = new Trade(tradeNode);
         }
     }
     
 
     XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");
     
     if (effectiveDateNode != null)
     {
         if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) 
         {
             if (effectiveDateNode.Attributes["id"] != null) 
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(effectiveDateNode);
                 IDManager.SetID(effectiveDateIDRef_, ob);
             }
             else if (effectiveDateNode.Attributes["href"] != null)
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 effectiveDate_ = new XsdTypeDate(effectiveDateNode);
             }
         }
         else
         {
             effectiveDate_ = new XsdTypeDate(effectiveDateNode);
         }
     }
     
 
     XmlNode changeEventNode = xmlNode.SelectSingleNode("changeEvent");
     
     if (changeEventNode != null)
     {
         if (changeEventNode.Attributes["href"] != null || changeEventNode.Attributes["id"] != null) 
         {
             if (changeEventNode.Attributes["id"] != null) 
             {
                 changeEventIDRef_ = changeEventNode.Attributes["id"].Value;
                 ChangeEvent ob = new ChangeEvent(changeEventNode);
                 IDManager.SetID(changeEventIDRef_, ob);
             }
             else if (changeEventNode.Attributes["href"] != null)
             {
                 changeEventIDRef_ = changeEventNode.Attributes["href"].Value;
             }
             else
             {
                 changeEvent_ = new ChangeEvent(changeEventNode);
             }
         }
         else
         {
             changeEvent_ = new ChangeEvent(changeEventNode);
         }
     }
     
 
     XmlNode indexChangeNode = xmlNode.SelectSingleNode("indexChange");
     
     if (indexChangeNode != null)
     {
         if (indexChangeNode.Attributes["href"] != null || indexChangeNode.Attributes["id"] != null) 
         {
             if (indexChangeNode.Attributes["id"] != null) 
             {
                 indexChangeIDRef_ = indexChangeNode.Attributes["id"].Value;
                 IndexChange ob = new IndexChange(indexChangeNode);
                 IDManager.SetID(indexChangeIDRef_, ob);
             }
             else if (indexChangeNode.Attributes["href"] != null)
             {
                 indexChangeIDRef_ = indexChangeNode.Attributes["href"].Value;
             }
             else
             {
                 indexChange_ = new IndexChange(indexChangeNode);
             }
         }
         else
         {
             indexChange_ = new IndexChange(indexChangeNode);
         }
     }
     
 
     XmlNode paymentNode = xmlNode.SelectSingleNode("payment");
     
     if (paymentNode != null)
     {
         if (paymentNode.Attributes["href"] != null || paymentNode.Attributes["id"] != null) 
         {
             if (paymentNode.Attributes["id"] != null) 
             {
                 paymentIDRef_ = paymentNode.Attributes["id"].Value;
                 Payment ob = new Payment(paymentNode);
                 IDManager.SetID(paymentIDRef_, ob);
             }
             else if (paymentNode.Attributes["href"] != null)
             {
                 paymentIDRef_ = paymentNode.Attributes["href"].Value;
             }
             else
             {
                 payment_ = new Payment(paymentNode);
             }
         }
         else
         {
             payment_ = new Payment(paymentNode);
         }
     }
     
 
 }
 public TradeChangeContent(XmlNode xmlNode)
 {
     XmlNodeList oldTradeIdentifierNodeList = xmlNode.SelectNodes("oldTradeIdentifier");
     if (oldTradeIdentifierNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in oldTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 oldTradeIdentifierIDRef = item.Attributes["id"].Name;
                 PartyTradeIdentifier ob = PartyTradeIdentifier();
                 IDManager.SetID(oldTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 oldTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 oldTradeIdentifier = new PartyTradeIdentifier(item);
             }
         }
     }
     
 
     XmlNodeList oldTradeNodeList = xmlNode.SelectNodes("oldTrade");
     if (oldTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in oldTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 oldTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(oldTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 oldTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 oldTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList tradeNodeList = xmlNode.SelectNodes("trade");
     if (tradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(tradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 trade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");
     if (effectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in effectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 effectiveDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(effectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 effectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 effectiveDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList changeEventNodeList = xmlNode.SelectNodes("changeEvent");
     if (changeEventNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in changeEventNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 changeEventIDRef = item.Attributes["id"].Name;
                 ChangeEvent ob = ChangeEvent();
                 IDManager.SetID(changeEventIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 changeEventIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 changeEvent = new ChangeEvent(item);
             }
         }
     }
     
 
     XmlNodeList indexChangeNodeList = xmlNode.SelectNodes("indexChange");
     if (indexChangeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexChangeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexChangeIDRef = item.Attributes["id"].Name;
                 IndexChange ob = IndexChange();
                 IDManager.SetID(indexChangeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexChangeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 indexChange = new IndexChange(item);
             }
         }
     }
     
 
     XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");
     if (paymentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentIDRef = item.Attributes["id"].Name;
                 Payment ob = Payment();
                 IDManager.SetID(paymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payment = new Payment(item);
             }
         }
     }
     
 
 }
Пример #3
0
        public TradeChangeContent(XmlNode xmlNode)
        {
            XmlNodeList oldTradeIdentifierNodeList = xmlNode.SelectNodes("oldTradeIdentifier");

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

            foreach (XmlNode item in oldTradeIdentifierNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        oldTradeIdentifierIDRef = item.Attributes["id"].Name;
                        PartyTradeIdentifier ob = PartyTradeIdentifier();
                        IDManager.SetID(oldTradeIdentifierIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        oldTradeIdentifierIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        oldTradeIdentifier = new PartyTradeIdentifier(item);
                    }
                }
            }


            XmlNodeList oldTradeNodeList = xmlNode.SelectNodes("oldTrade");

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

            foreach (XmlNode item in oldTradeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        oldTradeIDRef = item.Attributes["id"].Name;
                        Trade ob = Trade();
                        IDManager.SetID(oldTradeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        oldTradeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        oldTrade = new Trade(item);
                    }
                }
            }


            XmlNodeList tradeNodeList = xmlNode.SelectNodes("trade");

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

            foreach (XmlNode item in tradeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tradeIDRef = item.Attributes["id"].Name;
                        Trade ob = Trade();
                        IDManager.SetID(tradeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tradeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        trade = new Trade(item);
                    }
                }
            }


            XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");

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

            foreach (XmlNode item in effectiveDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        effectiveDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(effectiveDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        effectiveDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        effectiveDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList changeEventNodeList = xmlNode.SelectNodes("changeEvent");

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

            foreach (XmlNode item in changeEventNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        changeEventIDRef = item.Attributes["id"].Name;
                        ChangeEvent ob = ChangeEvent();
                        IDManager.SetID(changeEventIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        changeEventIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        changeEvent = new ChangeEvent(item);
                    }
                }
            }


            XmlNodeList indexChangeNodeList = xmlNode.SelectNodes("indexChange");

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

            foreach (XmlNode item in indexChangeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        indexChangeIDRef = item.Attributes["id"].Name;
                        IndexChange ob = IndexChange();
                        IDManager.SetID(indexChangeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        indexChangeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        indexChange = new IndexChange(item);
                    }
                }
            }


            XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");

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

            foreach (XmlNode item in paymentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentIDRef = item.Attributes["id"].Name;
                        Payment ob = Payment();
                        IDManager.SetID(paymentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payment = new Payment(item);
                    }
                }
            }
        }