public Commission(XmlNode xmlNode)
 {
     XmlNode commissionDenominationNode = xmlNode.SelectSingleNode("commissionDenomination");
     
     if (commissionDenominationNode != null)
     {
         if (commissionDenominationNode.Attributes["href"] != null || commissionDenominationNode.Attributes["id"] != null) 
         {
             if (commissionDenominationNode.Attributes["id"] != null) 
             {
                 commissionDenominationIDRef_ = commissionDenominationNode.Attributes["id"].Value;
                 CommissionDenominationEnum ob = new CommissionDenominationEnum(commissionDenominationNode);
                 IDManager.SetID(commissionDenominationIDRef_, ob);
             }
             else if (commissionDenominationNode.Attributes["href"] != null)
             {
                 commissionDenominationIDRef_ = commissionDenominationNode.Attributes["href"].Value;
             }
             else
             {
                 commissionDenomination_ = new CommissionDenominationEnum(commissionDenominationNode);
             }
         }
         else
         {
             commissionDenomination_ = new CommissionDenominationEnum(commissionDenominationNode);
         }
     }
     
 
     XmlNode commissionAmountNode = xmlNode.SelectSingleNode("commissionAmount");
     
     if (commissionAmountNode != null)
     {
         if (commissionAmountNode.Attributes["href"] != null || commissionAmountNode.Attributes["id"] != null) 
         {
             if (commissionAmountNode.Attributes["id"] != null) 
             {
                 commissionAmountIDRef_ = commissionAmountNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(commissionAmountNode);
                 IDManager.SetID(commissionAmountIDRef_, ob);
             }
             else if (commissionAmountNode.Attributes["href"] != null)
             {
                 commissionAmountIDRef_ = commissionAmountNode.Attributes["href"].Value;
             }
             else
             {
                 commissionAmount_ = new XsdTypeDecimal(commissionAmountNode);
             }
         }
         else
         {
             commissionAmount_ = new XsdTypeDecimal(commissionAmountNode);
         }
     }
     
 
     XmlNode currencyNode = xmlNode.SelectSingleNode("currency");
     
     if (currencyNode != null)
     {
         if (currencyNode.Attributes["href"] != null || currencyNode.Attributes["id"] != null) 
         {
             if (currencyNode.Attributes["id"] != null) 
             {
                 currencyIDRef_ = currencyNode.Attributes["id"].Value;
                 Currency ob = new Currency(currencyNode);
                 IDManager.SetID(currencyIDRef_, ob);
             }
             else if (currencyNode.Attributes["href"] != null)
             {
                 currencyIDRef_ = currencyNode.Attributes["href"].Value;
             }
             else
             {
                 currency_ = new Currency(currencyNode);
             }
         }
         else
         {
             currency_ = new Currency(currencyNode);
         }
     }
     
 
     XmlNode commissionPerTradeNode = xmlNode.SelectSingleNode("commissionPerTrade");
     
     if (commissionPerTradeNode != null)
     {
         if (commissionPerTradeNode.Attributes["href"] != null || commissionPerTradeNode.Attributes["id"] != null) 
         {
             if (commissionPerTradeNode.Attributes["id"] != null) 
             {
                 commissionPerTradeIDRef_ = commissionPerTradeNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(commissionPerTradeNode);
                 IDManager.SetID(commissionPerTradeIDRef_, ob);
             }
             else if (commissionPerTradeNode.Attributes["href"] != null)
             {
                 commissionPerTradeIDRef_ = commissionPerTradeNode.Attributes["href"].Value;
             }
             else
             {
                 commissionPerTrade_ = new XsdTypeDecimal(commissionPerTradeNode);
             }
         }
         else
         {
             commissionPerTrade_ = new XsdTypeDecimal(commissionPerTradeNode);
         }
     }
     
 
     XmlNodeList fxRateNodeList = xmlNode.SelectNodes("fxRate");
     
     if (fxRateNodeList != null)
     {
         this.fxRate_ = new List<FxRate>();
         foreach (XmlNode item in fxRateNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     fxRateIDRef_ = item.Attributes["id"].Value;
                     fxRate_.Add(new FxRate(item));
                     IDManager.SetID(fxRateIDRef_, fxRate_[fxRate_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     fxRateIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 fxRate_.Add(new FxRate(item));
                 }
             }
             else
             {
                 fxRate_.Add(new FxRate(item));
             }
         }
     }
     
 
 }
Пример #2
0
        public Commission(XmlNode xmlNode)
        {
            XmlNode commissionDenominationNode = xmlNode.SelectSingleNode("commissionDenomination");

            if (commissionDenominationNode != null)
            {
                if (commissionDenominationNode.Attributes["href"] != null || commissionDenominationNode.Attributes["id"] != null)
                {
                    if (commissionDenominationNode.Attributes["id"] != null)
                    {
                        commissionDenominationIDRef_ = commissionDenominationNode.Attributes["id"].Value;
                        CommissionDenominationEnum ob = new CommissionDenominationEnum(commissionDenominationNode);
                        IDManager.SetID(commissionDenominationIDRef_, ob);
                    }
                    else if (commissionDenominationNode.Attributes["href"] != null)
                    {
                        commissionDenominationIDRef_ = commissionDenominationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        commissionDenomination_ = new CommissionDenominationEnum(commissionDenominationNode);
                    }
                }
                else
                {
                    commissionDenomination_ = new CommissionDenominationEnum(commissionDenominationNode);
                }
            }


            XmlNode commissionAmountNode = xmlNode.SelectSingleNode("commissionAmount");

            if (commissionAmountNode != null)
            {
                if (commissionAmountNode.Attributes["href"] != null || commissionAmountNode.Attributes["id"] != null)
                {
                    if (commissionAmountNode.Attributes["id"] != null)
                    {
                        commissionAmountIDRef_ = commissionAmountNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(commissionAmountNode);
                        IDManager.SetID(commissionAmountIDRef_, ob);
                    }
                    else if (commissionAmountNode.Attributes["href"] != null)
                    {
                        commissionAmountIDRef_ = commissionAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        commissionAmount_ = new XsdTypeDecimal(commissionAmountNode);
                    }
                }
                else
                {
                    commissionAmount_ = new XsdTypeDecimal(commissionAmountNode);
                }
            }


            XmlNode currencyNode = xmlNode.SelectSingleNode("currency");

            if (currencyNode != null)
            {
                if (currencyNode.Attributes["href"] != null || currencyNode.Attributes["id"] != null)
                {
                    if (currencyNode.Attributes["id"] != null)
                    {
                        currencyIDRef_ = currencyNode.Attributes["id"].Value;
                        Currency ob = new Currency(currencyNode);
                        IDManager.SetID(currencyIDRef_, ob);
                    }
                    else if (currencyNode.Attributes["href"] != null)
                    {
                        currencyIDRef_ = currencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        currency_ = new Currency(currencyNode);
                    }
                }
                else
                {
                    currency_ = new Currency(currencyNode);
                }
            }


            XmlNode commissionPerTradeNode = xmlNode.SelectSingleNode("commissionPerTrade");

            if (commissionPerTradeNode != null)
            {
                if (commissionPerTradeNode.Attributes["href"] != null || commissionPerTradeNode.Attributes["id"] != null)
                {
                    if (commissionPerTradeNode.Attributes["id"] != null)
                    {
                        commissionPerTradeIDRef_ = commissionPerTradeNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(commissionPerTradeNode);
                        IDManager.SetID(commissionPerTradeIDRef_, ob);
                    }
                    else if (commissionPerTradeNode.Attributes["href"] != null)
                    {
                        commissionPerTradeIDRef_ = commissionPerTradeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        commissionPerTrade_ = new XsdTypeDecimal(commissionPerTradeNode);
                    }
                }
                else
                {
                    commissionPerTrade_ = new XsdTypeDecimal(commissionPerTradeNode);
                }
            }


            XmlNodeList fxRateNodeList = xmlNode.SelectNodes("fxRate");

            if (fxRateNodeList != null)
            {
                this.fxRate_ = new List <FxRate>();
                foreach (XmlNode item in fxRateNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            fxRateIDRef_ = item.Attributes["id"].Value;
                            fxRate_.Add(new FxRate(item));
                            IDManager.SetID(fxRateIDRef_, fxRate_[fxRate_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            fxRateIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            fxRate_.Add(new FxRate(item));
                        }
                    }
                    else
                    {
                        fxRate_.Add(new FxRate(item));
                    }
                }
            }
        }
Пример #3
0
        public Commission(XmlNode xmlNode)
        {
            XmlNodeList commissionDenominationNodeList = xmlNode.SelectNodes("commissionDenomination");

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

            foreach (XmlNode item in commissionDenominationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        commissionDenominationIDRef = item.Attributes["id"].Name;
                        CommissionDenominationEnum ob = CommissionDenominationEnum();
                        IDManager.SetID(commissionDenominationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        commissionDenominationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        commissionDenomination = new CommissionDenominationEnum(item);
                    }
                }
            }


            XmlNodeList commissionAmountNodeList = xmlNode.SelectNodes("commissionAmount");

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

            foreach (XmlNode item in commissionAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        commissionAmountIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(commissionAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        commissionAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        commissionAmount = new XsdTypeDecimal(item);
                    }
                }
            }


            XmlNodeList currencyNodeList = xmlNode.SelectNodes("currency");

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

            foreach (XmlNode item in currencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        currencyIDRef = item.Attributes["id"].Name;
                        Currency ob = Currency();
                        IDManager.SetID(currencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        currencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        currency = new Currency(item);
                    }
                }
            }


            XmlNodeList commissionPerTradeNodeList = xmlNode.SelectNodes("commissionPerTrade");

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

            foreach (XmlNode item in commissionPerTradeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        commissionPerTradeIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(commissionPerTradeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        commissionPerTradeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        commissionPerTrade = new XsdTypeDecimal(item);
                    }
                }
            }


            XmlNodeList fxRateNodeList = xmlNode.SelectNodes("fxRate");

            foreach (XmlNode item in fxRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fxRateIDRef = item.Attributes["id"].Name;
                        List <FxRate> ob = new List <FxRate>();
                        ob.Add(new FxRate(item));
                        IDManager.SetID(fxRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fxRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fxRate.Add(new FxRate(item));
                    }
                }
            }
        }