Exemplo n.º 1
0
        public FxOptionPayout(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList payoutStyleNodeList = xmlNode.SelectNodes("payoutStyle");

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

            foreach (XmlNode item in payoutStyleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        payoutStyleIDRef = item.Attributes["id"].Name;
                        PayoutEnum ob = PayoutEnum();
                        IDManager.SetID(payoutStyleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        payoutStyleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payoutStyle = new PayoutEnum(item);
                    }
                }
            }


            XmlNodeList settlementInformationNodeList = xmlNode.SelectNodes("settlementInformation");

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

            foreach (XmlNode item in settlementInformationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementInformationIDRef = item.Attributes["id"].Name;
                        SettlementInformation ob = SettlementInformation();
                        IDManager.SetID(settlementInformationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementInformationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementInformation = new SettlementInformation(item);
                    }
                }
            }
        }
 public FxOptionPayout(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode payoutStyleNode = xmlNode.SelectSingleNode("payoutStyle");
     
     if (payoutStyleNode != null)
     {
         if (payoutStyleNode.Attributes["href"] != null || payoutStyleNode.Attributes["id"] != null) 
         {
             if (payoutStyleNode.Attributes["id"] != null) 
             {
                 payoutStyleIDRef_ = payoutStyleNode.Attributes["id"].Value;
                 PayoutEnum ob = new PayoutEnum(payoutStyleNode);
                 IDManager.SetID(payoutStyleIDRef_, ob);
             }
             else if (payoutStyleNode.Attributes["href"] != null)
             {
                 payoutStyleIDRef_ = payoutStyleNode.Attributes["href"].Value;
             }
             else
             {
                 payoutStyle_ = new PayoutEnum(payoutStyleNode);
             }
         }
         else
         {
             payoutStyle_ = new PayoutEnum(payoutStyleNode);
         }
     }
     
 
     XmlNode settlementInformationNode = xmlNode.SelectSingleNode("settlementInformation");
     
     if (settlementInformationNode != null)
     {
         if (settlementInformationNode.Attributes["href"] != null || settlementInformationNode.Attributes["id"] != null) 
         {
             if (settlementInformationNode.Attributes["id"] != null) 
             {
                 settlementInformationIDRef_ = settlementInformationNode.Attributes["id"].Value;
                 SettlementInformation ob = new SettlementInformation(settlementInformationNode);
                 IDManager.SetID(settlementInformationIDRef_, ob);
             }
             else if (settlementInformationNode.Attributes["href"] != null)
             {
                 settlementInformationIDRef_ = settlementInformationNode.Attributes["href"].Value;
             }
             else
             {
                 settlementInformation_ = new SettlementInformation(settlementInformationNode);
             }
         }
         else
         {
             settlementInformation_ = new SettlementInformation(settlementInformationNode);
         }
     }
     
 
 }
Exemplo n.º 3
0
        public FxOptionPayout(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode payoutStyleNode = xmlNode.SelectSingleNode("payoutStyle");

            if (payoutStyleNode != null)
            {
                if (payoutStyleNode.Attributes["href"] != null || payoutStyleNode.Attributes["id"] != null)
                {
                    if (payoutStyleNode.Attributes["id"] != null)
                    {
                        payoutStyleIDRef_ = payoutStyleNode.Attributes["id"].Value;
                        PayoutEnum ob = new PayoutEnum(payoutStyleNode);
                        IDManager.SetID(payoutStyleIDRef_, ob);
                    }
                    else if (payoutStyleNode.Attributes["href"] != null)
                    {
                        payoutStyleIDRef_ = payoutStyleNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payoutStyle_ = new PayoutEnum(payoutStyleNode);
                    }
                }
                else
                {
                    payoutStyle_ = new PayoutEnum(payoutStyleNode);
                }
            }


            XmlNode settlementInformationNode = xmlNode.SelectSingleNode("settlementInformation");

            if (settlementInformationNode != null)
            {
                if (settlementInformationNode.Attributes["href"] != null || settlementInformationNode.Attributes["id"] != null)
                {
                    if (settlementInformationNode.Attributes["id"] != null)
                    {
                        settlementInformationIDRef_ = settlementInformationNode.Attributes["id"].Value;
                        SettlementInformation ob = new SettlementInformation(settlementInformationNode);
                        IDManager.SetID(settlementInformationIDRef_, ob);
                    }
                    else if (settlementInformationNode.Attributes["href"] != null)
                    {
                        settlementInformationIDRef_ = settlementInformationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settlementInformation_ = new SettlementInformation(settlementInformationNode);
                    }
                }
                else
                {
                    settlementInformation_ = new SettlementInformation(settlementInformationNode);
                }
            }
        }