Пример #1
0
        public TradeIdentifier(XmlNode xmlNode)
        {
            XmlNode issuerNode = xmlNode.SelectSingleNode("issuer");

            if (issuerNode != null)
            {
                if (issuerNode.Attributes["href"] != null || issuerNode.Attributes["id"] != null)
                {
                    if (issuerNode.Attributes["id"] != null)
                    {
                        issuerIDRef_ = issuerNode.Attributes["id"].Value;
                        IssuerId ob = new IssuerId(issuerNode);
                        IDManager.SetID(issuerIDRef_, ob);
                    }
                    else if (issuerNode.Attributes["href"] != null)
                    {
                        issuerIDRef_ = issuerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        issuer_ = new IssuerId(issuerNode);
                    }
                }
                else
                {
                    issuer_ = new IssuerId(issuerNode);
                }
            }


            XmlNode tradeIdNode = xmlNode.SelectSingleNode("tradeId");

            if (tradeIdNode != null)
            {
                if (tradeIdNode.Attributes["href"] != null || tradeIdNode.Attributes["id"] != null)
                {
                    if (tradeIdNode.Attributes["id"] != null)
                    {
                        tradeIdIDRef_ = tradeIdNode.Attributes["id"].Value;
                        TradeId ob = new TradeId(tradeIdNode);
                        IDManager.SetID(tradeIdIDRef_, ob);
                    }
                    else if (tradeIdNode.Attributes["href"] != null)
                    {
                        tradeIdIDRef_ = tradeIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tradeId_ = new TradeId(tradeIdNode);
                    }
                }
                else
                {
                    tradeId_ = new TradeId(tradeIdNode);
                }
            }


            XmlNode partyReferenceNode = xmlNode.SelectSingleNode("partyReference");

            if (partyReferenceNode != null)
            {
                if (partyReferenceNode.Attributes["href"] != null || partyReferenceNode.Attributes["id"] != null)
                {
                    if (partyReferenceNode.Attributes["id"] != null)
                    {
                        partyReferenceIDRef_ = partyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(partyReferenceNode);
                        IDManager.SetID(partyReferenceIDRef_, ob);
                    }
                    else if (partyReferenceNode.Attributes["href"] != null)
                    {
                        partyReferenceIDRef_ = partyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        partyReference_ = new PartyReference(partyReferenceNode);
                    }
                }
                else
                {
                    partyReference_ = new PartyReference(partyReferenceNode);
                }
            }


            XmlNode accountReferenceNode = xmlNode.SelectSingleNode("accountReference");

            if (accountReferenceNode != null)
            {
                if (accountReferenceNode.Attributes["href"] != null || accountReferenceNode.Attributes["id"] != null)
                {
                    if (accountReferenceNode.Attributes["id"] != null)
                    {
                        accountReferenceIDRef_ = accountReferenceNode.Attributes["id"].Value;
                        AccountReference ob = new AccountReference(accountReferenceNode);
                        IDManager.SetID(accountReferenceIDRef_, ob);
                    }
                    else if (accountReferenceNode.Attributes["href"] != null)
                    {
                        accountReferenceIDRef_ = accountReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        accountReference_ = new AccountReference(accountReferenceNode);
                    }
                }
                else
                {
                    accountReference_ = new AccountReference(accountReferenceNode);
                }
            }


            XmlNode versionedTradeIdNode = xmlNode.SelectSingleNode("versionedTradeId");

            if (versionedTradeIdNode != null)
            {
                if (versionedTradeIdNode.Attributes["href"] != null || versionedTradeIdNode.Attributes["id"] != null)
                {
                    if (versionedTradeIdNode.Attributes["id"] != null)
                    {
                        versionedTradeIdIDRef_ = versionedTradeIdNode.Attributes["id"].Value;
                        VersionedTradeId ob = new VersionedTradeId(versionedTradeIdNode);
                        IDManager.SetID(versionedTradeIdIDRef_, ob);
                    }
                    else if (versionedTradeIdNode.Attributes["href"] != null)
                    {
                        versionedTradeIdIDRef_ = versionedTradeIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        versionedTradeId_ = new VersionedTradeId(versionedTradeIdNode);
                    }
                }
                else
                {
                    versionedTradeId_ = new VersionedTradeId(versionedTradeIdNode);
                }
            }
        }
 public TradeIdentifier(XmlNode xmlNode)
 {
     XmlNodeList issuerNodeList = xmlNode.SelectNodes("issuer");
     if (issuerNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in issuerNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 issuerIDRef = item.Attributes["id"].Name;
                 IssuerId ob = IssuerId();
                 IDManager.SetID(issuerIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 issuerIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 issuer = new IssuerId(item);
             }
         }
     }
     
 
     XmlNodeList tradeIdNodeList = xmlNode.SelectNodes("tradeId");
     if (tradeIdNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tradeIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tradeIdIDRef = item.Attributes["id"].Name;
                 TradeId ob = TradeId();
                 IDManager.SetID(tradeIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tradeIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tradeId = new TradeId(item);
             }
         }
     }
     
 
     XmlNodeList partyReferenceNodeList = xmlNode.SelectNodes("partyReference");
     if (partyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in partyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(partyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 partyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList accountReferenceNodeList = xmlNode.SelectNodes("accountReference");
     if (accountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in accountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 accountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(accountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 accountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 accountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList versionedTradeIdNodeList = xmlNode.SelectNodes("versionedTradeId");
     if (versionedTradeIdNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in versionedTradeIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 versionedTradeIdIDRef = item.Attributes["id"].Name;
                 VersionedTradeId ob = VersionedTradeId();
                 IDManager.SetID(versionedTradeIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 versionedTradeIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 versionedTradeId = new VersionedTradeId(item);
             }
         }
     }
     
 
 }
 public TradeIdentifier(XmlNode xmlNode)
 {
     XmlNode issuerNode = xmlNode.SelectSingleNode("issuer");
     
     if (issuerNode != null)
     {
         if (issuerNode.Attributes["href"] != null || issuerNode.Attributes["id"] != null) 
         {
             if (issuerNode.Attributes["id"] != null) 
             {
                 issuerIDRef_ = issuerNode.Attributes["id"].Value;
                 IssuerId ob = new IssuerId(issuerNode);
                 IDManager.SetID(issuerIDRef_, ob);
             }
             else if (issuerNode.Attributes["href"] != null)
             {
                 issuerIDRef_ = issuerNode.Attributes["href"].Value;
             }
             else
             {
                 issuer_ = new IssuerId(issuerNode);
             }
         }
         else
         {
             issuer_ = new IssuerId(issuerNode);
         }
     }
     
 
     XmlNode tradeIdNode = xmlNode.SelectSingleNode("tradeId");
     
     if (tradeIdNode != null)
     {
         if (tradeIdNode.Attributes["href"] != null || tradeIdNode.Attributes["id"] != null) 
         {
             if (tradeIdNode.Attributes["id"] != null) 
             {
                 tradeIdIDRef_ = tradeIdNode.Attributes["id"].Value;
                 TradeId ob = new TradeId(tradeIdNode);
                 IDManager.SetID(tradeIdIDRef_, ob);
             }
             else if (tradeIdNode.Attributes["href"] != null)
             {
                 tradeIdIDRef_ = tradeIdNode.Attributes["href"].Value;
             }
             else
             {
                 tradeId_ = new TradeId(tradeIdNode);
             }
         }
         else
         {
             tradeId_ = new TradeId(tradeIdNode);
         }
     }
     
 
     XmlNode partyReferenceNode = xmlNode.SelectSingleNode("partyReference");
     
     if (partyReferenceNode != null)
     {
         if (partyReferenceNode.Attributes["href"] != null || partyReferenceNode.Attributes["id"] != null) 
         {
             if (partyReferenceNode.Attributes["id"] != null) 
             {
                 partyReferenceIDRef_ = partyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(partyReferenceNode);
                 IDManager.SetID(partyReferenceIDRef_, ob);
             }
             else if (partyReferenceNode.Attributes["href"] != null)
             {
                 partyReferenceIDRef_ = partyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 partyReference_ = new PartyReference(partyReferenceNode);
             }
         }
         else
         {
             partyReference_ = new PartyReference(partyReferenceNode);
         }
     }
     
 
     XmlNode accountReferenceNode = xmlNode.SelectSingleNode("accountReference");
     
     if (accountReferenceNode != null)
     {
         if (accountReferenceNode.Attributes["href"] != null || accountReferenceNode.Attributes["id"] != null) 
         {
             if (accountReferenceNode.Attributes["id"] != null) 
             {
                 accountReferenceIDRef_ = accountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(accountReferenceNode);
                 IDManager.SetID(accountReferenceIDRef_, ob);
             }
             else if (accountReferenceNode.Attributes["href"] != null)
             {
                 accountReferenceIDRef_ = accountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 accountReference_ = new AccountReference(accountReferenceNode);
             }
         }
         else
         {
             accountReference_ = new AccountReference(accountReferenceNode);
         }
     }
     
 
     XmlNode versionedTradeIdNode = xmlNode.SelectSingleNode("versionedTradeId");
     
     if (versionedTradeIdNode != null)
     {
         if (versionedTradeIdNode.Attributes["href"] != null || versionedTradeIdNode.Attributes["id"] != null) 
         {
             if (versionedTradeIdNode.Attributes["id"] != null) 
             {
                 versionedTradeIdIDRef_ = versionedTradeIdNode.Attributes["id"].Value;
                 VersionedTradeId ob = new VersionedTradeId(versionedTradeIdNode);
                 IDManager.SetID(versionedTradeIdIDRef_, ob);
             }
             else if (versionedTradeIdNode.Attributes["href"] != null)
             {
                 versionedTradeIdIDRef_ = versionedTradeIdNode.Attributes["href"].Value;
             }
             else
             {
                 versionedTradeId_ = new VersionedTradeId(versionedTradeIdNode);
             }
         }
         else
         {
             versionedTradeId_ = new VersionedTradeId(versionedTradeIdNode);
         }
     }
     
 
 }
        public TradeIdentifier(XmlNode xmlNode)
        {
            XmlNodeList issuerNodeList = xmlNode.SelectNodes("issuer");

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

            foreach (XmlNode item in issuerNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        issuerIDRef = item.Attributes["id"].Name;
                        IssuerId ob = IssuerId();
                        IDManager.SetID(issuerIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        issuerIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        issuer = new IssuerId(item);
                    }
                }
            }


            XmlNodeList tradeIdNodeList = xmlNode.SelectNodes("tradeId");

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

            foreach (XmlNode item in tradeIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tradeIdIDRef = item.Attributes["id"].Name;
                        TradeId ob = TradeId();
                        IDManager.SetID(tradeIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tradeIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tradeId = new TradeId(item);
                    }
                }
            }


            XmlNodeList partyReferenceNodeList = xmlNode.SelectNodes("partyReference");

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

            foreach (XmlNode item in partyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        partyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(partyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        partyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        partyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList accountReferenceNodeList = xmlNode.SelectNodes("accountReference");

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

            foreach (XmlNode item in accountReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        accountReferenceIDRef = item.Attributes["id"].Name;
                        AccountReference ob = AccountReference();
                        IDManager.SetID(accountReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        accountReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        accountReference = new AccountReference(item);
                    }
                }
            }


            XmlNodeList versionedTradeIdNodeList = xmlNode.SelectNodes("versionedTradeId");

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

            foreach (XmlNode item in versionedTradeIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        versionedTradeIdIDRef = item.Attributes["id"].Name;
                        VersionedTradeId ob = VersionedTradeId();
                        IDManager.SetID(versionedTradeIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        versionedTradeIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        versionedTradeId = new VersionedTradeId(item);
                    }
                }
            }
        }