public PositiveStep(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode stepValueNode = xmlNode.SelectSingleNode("stepValue");
     
     if (stepValueNode != null)
     {
         if (stepValueNode.Attributes["href"] != null || stepValueNode.Attributes["id"] != null) 
         {
             if (stepValueNode.Attributes["id"] != null) 
             {
                 stepValueIDRef_ = stepValueNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(stepValueNode);
                 IDManager.SetID(stepValueIDRef_, ob);
             }
             else if (stepValueNode.Attributes["href"] != null)
             {
                 stepValueIDRef_ = stepValueNode.Attributes["href"].Value;
             }
             else
             {
                 stepValue_ = new PositiveDecimal(stepValueNode);
             }
         }
         else
         {
             stepValue_ = new PositiveDecimal(stepValueNode);
         }
     }
     
 
 }
 public DividendPeriodDividend(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode dividendNode = xmlNode.SelectSingleNode("dividend");
     
     if (dividendNode != null)
     {
         if (dividendNode.Attributes["href"] != null || dividendNode.Attributes["id"] != null) 
         {
             if (dividendNode.Attributes["id"] != null) 
             {
                 dividendIDRef_ = dividendNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(dividendNode);
                 IDManager.SetID(dividendIDRef_, ob);
             }
             else if (dividendNode.Attributes["href"] != null)
             {
                 dividendIDRef_ = dividendNode.Attributes["href"].Value;
             }
             else
             {
                 dividend_ = new NonNegativeMoney(dividendNode);
             }
         }
         else
         {
             dividend_ = new NonNegativeMoney(dividendNode);
         }
     }
     
 
     XmlNode multiplierNode = xmlNode.SelectSingleNode("multiplier");
     
     if (multiplierNode != null)
     {
         if (multiplierNode.Attributes["href"] != null || multiplierNode.Attributes["id"] != null) 
         {
             if (multiplierNode.Attributes["id"] != null) 
             {
                 multiplierIDRef_ = multiplierNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(multiplierNode);
                 IDManager.SetID(multiplierIDRef_, ob);
             }
             else if (multiplierNode.Attributes["href"] != null)
             {
                 multiplierIDRef_ = multiplierNode.Attributes["href"].Value;
             }
             else
             {
                 multiplier_ = new PositiveDecimal(multiplierNode);
             }
         }
         else
         {
             multiplier_ = new PositiveDecimal(multiplierNode);
         }
     }
     
 
 }
 public PositiveMoney(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode amountNode = xmlNode.SelectSingleNode("amount");
     
     if (amountNode != null)
     {
         if (amountNode.Attributes["href"] != null || amountNode.Attributes["id"] != null) 
         {
             if (amountNode.Attributes["id"] != null) 
             {
                 amountIDRef_ = amountNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(amountNode);
                 IDManager.SetID(amountIDRef_, ob);
             }
             else if (amountNode.Attributes["href"] != null)
             {
                 amountIDRef_ = amountNode.Attributes["href"].Value;
             }
             else
             {
                 amount_ = new PositiveDecimal(amountNode);
             }
         }
         else
         {
             amount_ = new PositiveDecimal(amountNode);
         }
     }
     
 
 }
Exemple #4
0
        public FxStrikePrice(XmlNode xmlNode)
        {
            XmlNodeList rateNodeList = xmlNode.SelectNodes("rate");

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

            foreach (XmlNode item in rateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(rateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rate = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList strikeQuoteBasisNodeList = xmlNode.SelectNodes("strikeQuoteBasis");

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

            foreach (XmlNode item in strikeQuoteBasisNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        strikeQuoteBasisIDRef = item.Attributes["id"].Name;
                        StrikeQuoteBasisEnum ob = StrikeQuoteBasisEnum();
                        IDManager.SetID(strikeQuoteBasisIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        strikeQuoteBasisIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        strikeQuoteBasis = new StrikeQuoteBasisEnum(item);
                    }
                }
            }
        }
Exemple #5
0
        public StrikeSpread(XmlNode xmlNode)
        {
            XmlNodeList upperStrikeNodeList = xmlNode.SelectNodes("upperStrike");

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

            foreach (XmlNode item in upperStrikeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        upperStrikeIDRef = item.Attributes["id"].Name;
                        OptionStrike ob = OptionStrike();
                        IDManager.SetID(upperStrikeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        upperStrikeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        upperStrike = new OptionStrike(item);
                    }
                }
            }


            XmlNodeList upperStrikeNumberOfOptionsNodeList = xmlNode.SelectNodes("upperStrikeNumberOfOptions");

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

            foreach (XmlNode item in upperStrikeNumberOfOptionsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        upperStrikeNumberOfOptionsIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(upperStrikeNumberOfOptionsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        upperStrikeNumberOfOptionsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        upperStrikeNumberOfOptions = new PositiveDecimal(item);
                    }
                }
            }
        }
 public DualCurrencyStrikePrice(XmlNode xmlNode)
 {
     XmlNode rateNode = xmlNode.SelectSingleNode("rate");
     
     if (rateNode != null)
     {
         if (rateNode.Attributes["href"] != null || rateNode.Attributes["id"] != null) 
         {
             if (rateNode.Attributes["id"] != null) 
             {
                 rateIDRef_ = rateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(rateNode);
                 IDManager.SetID(rateIDRef_, ob);
             }
             else if (rateNode.Attributes["href"] != null)
             {
                 rateIDRef_ = rateNode.Attributes["href"].Value;
             }
             else
             {
                 rate_ = new PositiveDecimal(rateNode);
             }
         }
         else
         {
             rate_ = new PositiveDecimal(rateNode);
         }
     }
     
 
     XmlNode strikeQuoteBasisNode = xmlNode.SelectSingleNode("strikeQuoteBasis");
     
     if (strikeQuoteBasisNode != null)
     {
         if (strikeQuoteBasisNode.Attributes["href"] != null || strikeQuoteBasisNode.Attributes["id"] != null) 
         {
             if (strikeQuoteBasisNode.Attributes["id"] != null) 
             {
                 strikeQuoteBasisIDRef_ = strikeQuoteBasisNode.Attributes["id"].Value;
                 DualCurrencyStrikeQuoteBasisEnum ob = new DualCurrencyStrikeQuoteBasisEnum(strikeQuoteBasisNode);
                 IDManager.SetID(strikeQuoteBasisIDRef_, ob);
             }
             else if (strikeQuoteBasisNode.Attributes["href"] != null)
             {
                 strikeQuoteBasisIDRef_ = strikeQuoteBasisNode.Attributes["href"].Value;
             }
             else
             {
                 strikeQuoteBasis_ = new DualCurrencyStrikeQuoteBasisEnum(strikeQuoteBasisNode);
             }
         }
         else
         {
             strikeQuoteBasis_ = new DualCurrencyStrikeQuoteBasisEnum(strikeQuoteBasisNode);
         }
     }
     
 
 }
 public ElectricityProduct(XmlNode xmlNode)
 {
     XmlNode typeNode = xmlNode.SelectSingleNode("type");
     
     if (typeNode != null)
     {
         if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) 
         {
             if (typeNode.Attributes["id"] != null) 
             {
                 typeIDRef_ = typeNode.Attributes["id"].Value;
                 ElectricityProductTypeEnum ob = new ElectricityProductTypeEnum(typeNode);
                 IDManager.SetID(typeIDRef_, ob);
             }
             else if (typeNode.Attributes["href"] != null)
             {
                 typeIDRef_ = typeNode.Attributes["href"].Value;
             }
             else
             {
                 type_ = new ElectricityProductTypeEnum(typeNode);
             }
         }
         else
         {
             type_ = new ElectricityProductTypeEnum(typeNode);
         }
     }
     
 
     XmlNode voltageNode = xmlNode.SelectSingleNode("voltage");
     
     if (voltageNode != null)
     {
         if (voltageNode.Attributes["href"] != null || voltageNode.Attributes["id"] != null) 
         {
             if (voltageNode.Attributes["id"] != null) 
             {
                 voltageIDRef_ = voltageNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(voltageNode);
                 IDManager.SetID(voltageIDRef_, ob);
             }
             else if (voltageNode.Attributes["href"] != null)
             {
                 voltageIDRef_ = voltageNode.Attributes["href"].Value;
             }
             else
             {
                 voltage_ = new PositiveDecimal(voltageNode);
             }
         }
         else
         {
             voltage_ = new PositiveDecimal(voltageNode);
         }
     }
     
 
 }
 public StrikeSpread(XmlNode xmlNode)
 {
     XmlNode upperStrikeNode = xmlNode.SelectSingleNode("upperStrike");
     
     if (upperStrikeNode != null)
     {
         if (upperStrikeNode.Attributes["href"] != null || upperStrikeNode.Attributes["id"] != null) 
         {
             if (upperStrikeNode.Attributes["id"] != null) 
             {
                 upperStrikeIDRef_ = upperStrikeNode.Attributes["id"].Value;
                 OptionStrike ob = new OptionStrike(upperStrikeNode);
                 IDManager.SetID(upperStrikeIDRef_, ob);
             }
             else if (upperStrikeNode.Attributes["href"] != null)
             {
                 upperStrikeIDRef_ = upperStrikeNode.Attributes["href"].Value;
             }
             else
             {
                 upperStrike_ = new OptionStrike(upperStrikeNode);
             }
         }
         else
         {
             upperStrike_ = new OptionStrike(upperStrikeNode);
         }
     }
     
 
     XmlNode upperStrikeNumberOfOptionsNode = xmlNode.SelectSingleNode("upperStrikeNumberOfOptions");
     
     if (upperStrikeNumberOfOptionsNode != null)
     {
         if (upperStrikeNumberOfOptionsNode.Attributes["href"] != null || upperStrikeNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (upperStrikeNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 upperStrikeNumberOfOptionsIDRef_ = upperStrikeNumberOfOptionsNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(upperStrikeNumberOfOptionsNode);
                 IDManager.SetID(upperStrikeNumberOfOptionsIDRef_, ob);
             }
             else if (upperStrikeNumberOfOptionsNode.Attributes["href"] != null)
             {
                 upperStrikeNumberOfOptionsIDRef_ = upperStrikeNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 upperStrikeNumberOfOptions_ = new PositiveDecimal(upperStrikeNumberOfOptionsNode);
             }
         }
         else
         {
             upperStrikeNumberOfOptions_ = new PositiveDecimal(upperStrikeNumberOfOptionsNode);
         }
     }
     
 
 }
 public UpperBound(XmlNode xmlNode)
 {
     XmlNode maximumInclusiveNode = xmlNode.SelectSingleNode("maximumInclusive");
     
     if (maximumInclusiveNode != null)
     {
         if (maximumInclusiveNode.Attributes["href"] != null || maximumInclusiveNode.Attributes["id"] != null) 
         {
             if (maximumInclusiveNode.Attributes["id"] != null) 
             {
                 maximumInclusiveIDRef_ = maximumInclusiveNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(maximumInclusiveNode);
                 IDManager.SetID(maximumInclusiveIDRef_, ob);
             }
             else if (maximumInclusiveNode.Attributes["href"] != null)
             {
                 maximumInclusiveIDRef_ = maximumInclusiveNode.Attributes["href"].Value;
             }
             else
             {
                 maximumInclusive_ = new PositiveDecimal(maximumInclusiveNode);
             }
         }
         else
         {
             maximumInclusive_ = new PositiveDecimal(maximumInclusiveNode);
         }
     }
     
 
     XmlNode maximumExclusiveNode = xmlNode.SelectSingleNode("maximumExclusive");
     
     if (maximumExclusiveNode != null)
     {
         if (maximumExclusiveNode.Attributes["href"] != null || maximumExclusiveNode.Attributes["id"] != null) 
         {
             if (maximumExclusiveNode.Attributes["id"] != null) 
             {
                 maximumExclusiveIDRef_ = maximumExclusiveNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(maximumExclusiveNode);
                 IDManager.SetID(maximumExclusiveIDRef_, ob);
             }
             else if (maximumExclusiveNode.Attributes["href"] != null)
             {
                 maximumExclusiveIDRef_ = maximumExclusiveNode.Attributes["href"].Value;
             }
             else
             {
                 maximumExclusive_ = new PositiveDecimal(maximumExclusiveNode);
             }
         }
         else
         {
             maximumExclusive_ = new PositiveDecimal(maximumExclusiveNode);
         }
     }
     
 
 }
Exemple #10
0
        public DividendPeriodDividend(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode dividendNode = xmlNode.SelectSingleNode("dividend");

            if (dividendNode != null)
            {
                if (dividendNode.Attributes["href"] != null || dividendNode.Attributes["id"] != null)
                {
                    if (dividendNode.Attributes["id"] != null)
                    {
                        dividendIDRef_ = dividendNode.Attributes["id"].Value;
                        NonNegativeMoney ob = new NonNegativeMoney(dividendNode);
                        IDManager.SetID(dividendIDRef_, ob);
                    }
                    else if (dividendNode.Attributes["href"] != null)
                    {
                        dividendIDRef_ = dividendNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dividend_ = new NonNegativeMoney(dividendNode);
                    }
                }
                else
                {
                    dividend_ = new NonNegativeMoney(dividendNode);
                }
            }


            XmlNode multiplierNode = xmlNode.SelectSingleNode("multiplier");

            if (multiplierNode != null)
            {
                if (multiplierNode.Attributes["href"] != null || multiplierNode.Attributes["id"] != null)
                {
                    if (multiplierNode.Attributes["id"] != null)
                    {
                        multiplierIDRef_ = multiplierNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(multiplierNode);
                        IDManager.SetID(multiplierIDRef_, ob);
                    }
                    else if (multiplierNode.Attributes["href"] != null)
                    {
                        multiplierIDRef_ = multiplierNode.Attributes["href"].Value;
                    }
                    else
                    {
                        multiplier_ = new PositiveDecimal(multiplierNode);
                    }
                }
                else
                {
                    multiplier_ = new PositiveDecimal(multiplierNode);
                }
            }
        }
Exemple #11
0
        public ElectricityProduct(XmlNode xmlNode)
        {
            XmlNode typeNode = xmlNode.SelectSingleNode("type");

            if (typeNode != null)
            {
                if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null)
                {
                    if (typeNode.Attributes["id"] != null)
                    {
                        typeIDRef_ = typeNode.Attributes["id"].Value;
                        ElectricityProductTypeEnum ob = new ElectricityProductTypeEnum(typeNode);
                        IDManager.SetID(typeIDRef_, ob);
                    }
                    else if (typeNode.Attributes["href"] != null)
                    {
                        typeIDRef_ = typeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        type_ = new ElectricityProductTypeEnum(typeNode);
                    }
                }
                else
                {
                    type_ = new ElectricityProductTypeEnum(typeNode);
                }
            }


            XmlNode voltageNode = xmlNode.SelectSingleNode("voltage");

            if (voltageNode != null)
            {
                if (voltageNode.Attributes["href"] != null || voltageNode.Attributes["id"] != null)
                {
                    if (voltageNode.Attributes["id"] != null)
                    {
                        voltageIDRef_ = voltageNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(voltageNode);
                        IDManager.SetID(voltageIDRef_, ob);
                    }
                    else if (voltageNode.Attributes["href"] != null)
                    {
                        voltageIDRef_ = voltageNode.Attributes["href"].Value;
                    }
                    else
                    {
                        voltage_ = new PositiveDecimal(voltageNode);
                    }
                }
                else
                {
                    voltage_ = new PositiveDecimal(voltageNode);
                }
            }
        }
Exemple #12
0
        public StrikeSpread(XmlNode xmlNode)
        {
            XmlNode upperStrikeNode = xmlNode.SelectSingleNode("upperStrike");

            if (upperStrikeNode != null)
            {
                if (upperStrikeNode.Attributes["href"] != null || upperStrikeNode.Attributes["id"] != null)
                {
                    if (upperStrikeNode.Attributes["id"] != null)
                    {
                        upperStrikeIDRef_ = upperStrikeNode.Attributes["id"].Value;
                        OptionStrike ob = new OptionStrike(upperStrikeNode);
                        IDManager.SetID(upperStrikeIDRef_, ob);
                    }
                    else if (upperStrikeNode.Attributes["href"] != null)
                    {
                        upperStrikeIDRef_ = upperStrikeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        upperStrike_ = new OptionStrike(upperStrikeNode);
                    }
                }
                else
                {
                    upperStrike_ = new OptionStrike(upperStrikeNode);
                }
            }


            XmlNode upperStrikeNumberOfOptionsNode = xmlNode.SelectSingleNode("upperStrikeNumberOfOptions");

            if (upperStrikeNumberOfOptionsNode != null)
            {
                if (upperStrikeNumberOfOptionsNode.Attributes["href"] != null || upperStrikeNumberOfOptionsNode.Attributes["id"] != null)
                {
                    if (upperStrikeNumberOfOptionsNode.Attributes["id"] != null)
                    {
                        upperStrikeNumberOfOptionsIDRef_ = upperStrikeNumberOfOptionsNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(upperStrikeNumberOfOptionsNode);
                        IDManager.SetID(upperStrikeNumberOfOptionsIDRef_, ob);
                    }
                    else if (upperStrikeNumberOfOptionsNode.Attributes["href"] != null)
                    {
                        upperStrikeNumberOfOptionsIDRef_ = upperStrikeNumberOfOptionsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        upperStrikeNumberOfOptions_ = new PositiveDecimal(upperStrikeNumberOfOptionsNode);
                    }
                }
                else
                {
                    upperStrikeNumberOfOptions_ = new PositiveDecimal(upperStrikeNumberOfOptionsNode);
                }
            }
        }
        public DualCurrencyStrikePrice(XmlNode xmlNode)
        {
            XmlNode rateNode = xmlNode.SelectSingleNode("rate");

            if (rateNode != null)
            {
                if (rateNode.Attributes["href"] != null || rateNode.Attributes["id"] != null)
                {
                    if (rateNode.Attributes["id"] != null)
                    {
                        rateIDRef_ = rateNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(rateNode);
                        IDManager.SetID(rateIDRef_, ob);
                    }
                    else if (rateNode.Attributes["href"] != null)
                    {
                        rateIDRef_ = rateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rate_ = new PositiveDecimal(rateNode);
                    }
                }
                else
                {
                    rate_ = new PositiveDecimal(rateNode);
                }
            }


            XmlNode strikeQuoteBasisNode = xmlNode.SelectSingleNode("strikeQuoteBasis");

            if (strikeQuoteBasisNode != null)
            {
                if (strikeQuoteBasisNode.Attributes["href"] != null || strikeQuoteBasisNode.Attributes["id"] != null)
                {
                    if (strikeQuoteBasisNode.Attributes["id"] != null)
                    {
                        strikeQuoteBasisIDRef_ = strikeQuoteBasisNode.Attributes["id"].Value;
                        DualCurrencyStrikeQuoteBasisEnum ob = new DualCurrencyStrikeQuoteBasisEnum(strikeQuoteBasisNode);
                        IDManager.SetID(strikeQuoteBasisIDRef_, ob);
                    }
                    else if (strikeQuoteBasisNode.Attributes["href"] != null)
                    {
                        strikeQuoteBasisIDRef_ = strikeQuoteBasisNode.Attributes["href"].Value;
                    }
                    else
                    {
                        strikeQuoteBasis_ = new DualCurrencyStrikeQuoteBasisEnum(strikeQuoteBasisNode);
                    }
                }
                else
                {
                    strikeQuoteBasis_ = new DualCurrencyStrikeQuoteBasisEnum(strikeQuoteBasisNode);
                }
            }
        }
        public UpperBound(XmlNode xmlNode)
        {
            XmlNode maximumInclusiveNode = xmlNode.SelectSingleNode("maximumInclusive");

            if (maximumInclusiveNode != null)
            {
                if (maximumInclusiveNode.Attributes["href"] != null || maximumInclusiveNode.Attributes["id"] != null)
                {
                    if (maximumInclusiveNode.Attributes["id"] != null)
                    {
                        maximumInclusiveIDRef_ = maximumInclusiveNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(maximumInclusiveNode);
                        IDManager.SetID(maximumInclusiveIDRef_, ob);
                    }
                    else if (maximumInclusiveNode.Attributes["href"] != null)
                    {
                        maximumInclusiveIDRef_ = maximumInclusiveNode.Attributes["href"].Value;
                    }
                    else
                    {
                        maximumInclusive_ = new PositiveDecimal(maximumInclusiveNode);
                    }
                }
                else
                {
                    maximumInclusive_ = new PositiveDecimal(maximumInclusiveNode);
                }
            }


            XmlNode maximumExclusiveNode = xmlNode.SelectSingleNode("maximumExclusive");

            if (maximumExclusiveNode != null)
            {
                if (maximumExclusiveNode.Attributes["href"] != null || maximumExclusiveNode.Attributes["id"] != null)
                {
                    if (maximumExclusiveNode.Attributes["id"] != null)
                    {
                        maximumExclusiveIDRef_ = maximumExclusiveNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(maximumExclusiveNode);
                        IDManager.SetID(maximumExclusiveIDRef_, ob);
                    }
                    else if (maximumExclusiveNode.Attributes["href"] != null)
                    {
                        maximumExclusiveIDRef_ = maximumExclusiveNode.Attributes["href"].Value;
                    }
                    else
                    {
                        maximumExclusive_ = new PositiveDecimal(maximumExclusiveNode);
                    }
                }
                else
                {
                    maximumExclusive_ = new PositiveDecimal(maximumExclusiveNode);
                }
            }
        }
Exemple #15
0
        public PositiveSchedule(XmlNode xmlNode)
        {
            XmlNodeList initialValueNodeList = xmlNode.SelectNodes("initialValue");

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

            foreach (XmlNode item in initialValueNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        initialValueIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(initialValueIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        initialValueIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        initialValue = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList stepNodeList = xmlNode.SelectNodes("step");

            foreach (XmlNode item in stepNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        stepIDRef = item.Attributes["id"].Name;
                        List <PositiveStep> ob = new List <PositiveStep>();
                        ob.Add(new PositiveStep(item));
                        IDManager.SetID(stepIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        stepIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        step.Add(new PositiveStep(item));
                    }
                }
            }
        }
 public CrossRate(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode rateNode = xmlNode.SelectSingleNode("rate");
     
     if (rateNode != null)
     {
         if (rateNode.Attributes["href"] != null || rateNode.Attributes["id"] != null) 
         {
             if (rateNode.Attributes["id"] != null) 
             {
                 rateIDRef_ = rateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(rateNode);
                 IDManager.SetID(rateIDRef_, ob);
             }
             else if (rateNode.Attributes["href"] != null)
             {
                 rateIDRef_ = rateNode.Attributes["href"].Value;
             }
             else
             {
                 rate_ = new PositiveDecimal(rateNode);
             }
         }
         else
         {
             rate_ = new PositiveDecimal(rateNode);
         }
     }
     
 
     XmlNode spotRateNode = xmlNode.SelectSingleNode("spotRate");
     
     if (spotRateNode != null)
     {
         if (spotRateNode.Attributes["href"] != null || spotRateNode.Attributes["id"] != null) 
         {
             if (spotRateNode.Attributes["id"] != null) 
             {
                 spotRateIDRef_ = spotRateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(spotRateNode);
                 IDManager.SetID(spotRateIDRef_, ob);
             }
             else if (spotRateNode.Attributes["href"] != null)
             {
                 spotRateIDRef_ = spotRateNode.Attributes["href"].Value;
             }
             else
             {
                 spotRate_ = new PositiveDecimal(spotRateNode);
             }
         }
         else
         {
             spotRate_ = new PositiveDecimal(spotRateNode);
         }
     }
     
 
     XmlNode forwardPointsNode = xmlNode.SelectSingleNode("forwardPoints");
     
     if (forwardPointsNode != null)
     {
         if (forwardPointsNode.Attributes["href"] != null || forwardPointsNode.Attributes["id"] != null) 
         {
             if (forwardPointsNode.Attributes["id"] != null) 
             {
                 forwardPointsIDRef_ = forwardPointsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(forwardPointsNode);
                 IDManager.SetID(forwardPointsIDRef_, ob);
             }
             else if (forwardPointsNode.Attributes["href"] != null)
             {
                 forwardPointsIDRef_ = forwardPointsNode.Attributes["href"].Value;
             }
             else
             {
                 forwardPoints_ = new XsdTypeDecimal(forwardPointsNode);
             }
         }
         else
         {
             forwardPoints_ = new XsdTypeDecimal(forwardPointsNode);
         }
     }
     
 
 }
 public FxTrigger(XmlNode xmlNode)
 {
     XmlNode triggerConditionNode = xmlNode.SelectSingleNode("triggerCondition");
     
     if (triggerConditionNode != null)
     {
         if (triggerConditionNode.Attributes["href"] != null || triggerConditionNode.Attributes["id"] != null) 
         {
             if (triggerConditionNode.Attributes["id"] != null) 
             {
                 triggerConditionIDRef_ = triggerConditionNode.Attributes["id"].Value;
                 TriggerConditionEnum ob = new TriggerConditionEnum(triggerConditionNode);
                 IDManager.SetID(triggerConditionIDRef_, ob);
             }
             else if (triggerConditionNode.Attributes["href"] != null)
             {
                 triggerConditionIDRef_ = triggerConditionNode.Attributes["href"].Value;
             }
             else
             {
                 triggerCondition_ = new TriggerConditionEnum(triggerConditionNode);
             }
         }
         else
         {
             triggerCondition_ = new TriggerConditionEnum(triggerConditionNode);
         }
     }
     
 
     XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");
     
     if (quotedCurrencyPairNode != null)
     {
         if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null) 
         {
             if (quotedCurrencyPairNode.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                 QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                 IDManager.SetID(quotedCurrencyPairIDRef_, ob);
             }
             else if (quotedCurrencyPairNode.Attributes["href"] != null)
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
             }
             else
             {
                 quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
             }
         }
         else
         {
             quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
         }
     }
     
 
     XmlNode triggerRateNode = xmlNode.SelectSingleNode("triggerRate");
     
     if (triggerRateNode != null)
     {
         if (triggerRateNode.Attributes["href"] != null || triggerRateNode.Attributes["id"] != null) 
         {
             if (triggerRateNode.Attributes["id"] != null) 
             {
                 triggerRateIDRef_ = triggerRateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(triggerRateNode);
                 IDManager.SetID(triggerRateIDRef_, ob);
             }
             else if (triggerRateNode.Attributes["href"] != null)
             {
                 triggerRateIDRef_ = triggerRateNode.Attributes["href"].Value;
             }
             else
             {
                 triggerRate_ = new PositiveDecimal(triggerRateNode);
             }
         }
         else
         {
             triggerRate_ = new PositiveDecimal(triggerRateNode);
         }
     }
     
 
     XmlNode spotRateNode = xmlNode.SelectSingleNode("spotRate");
     
     if (spotRateNode != null)
     {
         if (spotRateNode.Attributes["href"] != null || spotRateNode.Attributes["id"] != null) 
         {
             if (spotRateNode.Attributes["id"] != null) 
             {
                 spotRateIDRef_ = spotRateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(spotRateNode);
                 IDManager.SetID(spotRateIDRef_, ob);
             }
             else if (spotRateNode.Attributes["href"] != null)
             {
                 spotRateIDRef_ = spotRateNode.Attributes["href"].Value;
             }
             else
             {
                 spotRate_ = new PositiveDecimal(spotRateNode);
             }
         }
         else
         {
             spotRate_ = new PositiveDecimal(spotRateNode);
         }
     }
     
 
     XmlNodeList informationSourceNodeList = xmlNode.SelectNodes("informationSource");
     
     if (informationSourceNodeList != null)
     {
         this.informationSource_ = new List<InformationSource>();
         foreach (XmlNode item in informationSourceNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     informationSourceIDRef_ = item.Attributes["id"].Value;
                     informationSource_.Add(new InformationSource(item));
                     IDManager.SetID(informationSourceIDRef_, informationSource_[informationSource_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     informationSourceIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 informationSource_.Add(new InformationSource(item));
                 }
             }
             else
             {
                 informationSource_.Add(new InformationSource(item));
             }
         }
     }
     
 
 }
 public EquityOptionTransactionSupplement(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode exchangeLookAlikeNode = xmlNode.SelectSingleNode("exchangeLookAlike");
     
     if (exchangeLookAlikeNode != null)
     {
         if (exchangeLookAlikeNode.Attributes["href"] != null || exchangeLookAlikeNode.Attributes["id"] != null) 
         {
             if (exchangeLookAlikeNode.Attributes["id"] != null) 
             {
                 exchangeLookAlikeIDRef_ = exchangeLookAlikeNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(exchangeLookAlikeNode);
                 IDManager.SetID(exchangeLookAlikeIDRef_, ob);
             }
             else if (exchangeLookAlikeNode.Attributes["href"] != null)
             {
                 exchangeLookAlikeIDRef_ = exchangeLookAlikeNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeLookAlike_ = new XsdTypeBoolean(exchangeLookAlikeNode);
             }
         }
         else
         {
             exchangeLookAlike_ = new XsdTypeBoolean(exchangeLookAlikeNode);
         }
     }
     
 
     XmlNode exchangeTradedContractNearestNode = xmlNode.SelectSingleNode("exchangeTradedContractNearest");
     
     if (exchangeTradedContractNearestNode != null)
     {
         if (exchangeTradedContractNearestNode.Attributes["href"] != null || exchangeTradedContractNearestNode.Attributes["id"] != null) 
         {
             if (exchangeTradedContractNearestNode.Attributes["id"] != null) 
             {
                 exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(exchangeTradedContractNearestNode);
                 IDManager.SetID(exchangeTradedContractNearestIDRef_, ob);
             }
             else if (exchangeTradedContractNearestNode.Attributes["href"] != null)
             {
                 exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeTradedContractNearest_ = new XsdTypeBoolean(exchangeTradedContractNearestNode);
             }
         }
         else
         {
             exchangeTradedContractNearest_ = new XsdTypeBoolean(exchangeTradedContractNearestNode);
         }
     }
     
 
     XmlNode multipleExchangeIndexAnnexFallbackNode = xmlNode.SelectSingleNode("multipleExchangeIndexAnnexFallback");
     
     if (multipleExchangeIndexAnnexFallbackNode != null)
     {
         if (multipleExchangeIndexAnnexFallbackNode.Attributes["href"] != null || multipleExchangeIndexAnnexFallbackNode.Attributes["id"] != null) 
         {
             if (multipleExchangeIndexAnnexFallbackNode.Attributes["id"] != null) 
             {
                 multipleExchangeIndexAnnexFallbackIDRef_ = multipleExchangeIndexAnnexFallbackNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(multipleExchangeIndexAnnexFallbackNode);
                 IDManager.SetID(multipleExchangeIndexAnnexFallbackIDRef_, ob);
             }
             else if (multipleExchangeIndexAnnexFallbackNode.Attributes["href"] != null)
             {
                 multipleExchangeIndexAnnexFallbackIDRef_ = multipleExchangeIndexAnnexFallbackNode.Attributes["href"].Value;
             }
             else
             {
                 multipleExchangeIndexAnnexFallback_ = new XsdTypeBoolean(multipleExchangeIndexAnnexFallbackNode);
             }
         }
         else
         {
             multipleExchangeIndexAnnexFallback_ = new XsdTypeBoolean(multipleExchangeIndexAnnexFallbackNode);
         }
     }
     
 
     XmlNode componentSecurityIndexAnnexFallbackNode = xmlNode.SelectSingleNode("componentSecurityIndexAnnexFallback");
     
     if (componentSecurityIndexAnnexFallbackNode != null)
     {
         if (componentSecurityIndexAnnexFallbackNode.Attributes["href"] != null || componentSecurityIndexAnnexFallbackNode.Attributes["id"] != null) 
         {
             if (componentSecurityIndexAnnexFallbackNode.Attributes["id"] != null) 
             {
                 componentSecurityIndexAnnexFallbackIDRef_ = componentSecurityIndexAnnexFallbackNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(componentSecurityIndexAnnexFallbackNode);
                 IDManager.SetID(componentSecurityIndexAnnexFallbackIDRef_, ob);
             }
             else if (componentSecurityIndexAnnexFallbackNode.Attributes["href"] != null)
             {
                 componentSecurityIndexAnnexFallbackIDRef_ = componentSecurityIndexAnnexFallbackNode.Attributes["href"].Value;
             }
             else
             {
                 componentSecurityIndexAnnexFallback_ = new XsdTypeBoolean(componentSecurityIndexAnnexFallbackNode);
             }
         }
         else
         {
             componentSecurityIndexAnnexFallback_ = new XsdTypeBoolean(componentSecurityIndexAnnexFallbackNode);
         }
     }
     
 
     XmlNode methodOfAdjustmentNode = xmlNode.SelectSingleNode("methodOfAdjustment");
     
     if (methodOfAdjustmentNode != null)
     {
         if (methodOfAdjustmentNode.Attributes["href"] != null || methodOfAdjustmentNode.Attributes["id"] != null) 
         {
             if (methodOfAdjustmentNode.Attributes["id"] != null) 
             {
                 methodOfAdjustmentIDRef_ = methodOfAdjustmentNode.Attributes["id"].Value;
                 MethodOfAdjustmentEnum ob = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
                 IDManager.SetID(methodOfAdjustmentIDRef_, ob);
             }
             else if (methodOfAdjustmentNode.Attributes["href"] != null)
             {
                 methodOfAdjustmentIDRef_ = methodOfAdjustmentNode.Attributes["href"].Value;
             }
             else
             {
                 methodOfAdjustment_ = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
             }
         }
         else
         {
             methodOfAdjustment_ = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
         }
     }
     
 
     XmlNode localJurisdictionNode = xmlNode.SelectSingleNode("localJurisdiction");
     
     if (localJurisdictionNode != null)
     {
         if (localJurisdictionNode.Attributes["href"] != null || localJurisdictionNode.Attributes["id"] != null) 
         {
             if (localJurisdictionNode.Attributes["id"] != null) 
             {
                 localJurisdictionIDRef_ = localJurisdictionNode.Attributes["id"].Value;
                 CountryCode ob = new CountryCode(localJurisdictionNode);
                 IDManager.SetID(localJurisdictionIDRef_, ob);
             }
             else if (localJurisdictionNode.Attributes["href"] != null)
             {
                 localJurisdictionIDRef_ = localJurisdictionNode.Attributes["href"].Value;
             }
             else
             {
                 localJurisdiction_ = new CountryCode(localJurisdictionNode);
             }
         }
         else
         {
             localJurisdiction_ = new CountryCode(localJurisdictionNode);
         }
     }
     
 
     XmlNode optionEntitlementNode = xmlNode.SelectSingleNode("optionEntitlement");
     
     if (optionEntitlementNode != null)
     {
         if (optionEntitlementNode.Attributes["href"] != null || optionEntitlementNode.Attributes["id"] != null) 
         {
             if (optionEntitlementNode.Attributes["id"] != null) 
             {
                 optionEntitlementIDRef_ = optionEntitlementNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(optionEntitlementNode);
                 IDManager.SetID(optionEntitlementIDRef_, ob);
             }
             else if (optionEntitlementNode.Attributes["href"] != null)
             {
                 optionEntitlementIDRef_ = optionEntitlementNode.Attributes["href"].Value;
             }
             else
             {
                 optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
             }
         }
         else
         {
             optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
         }
     }
     
 
     XmlNode multiplierNode = xmlNode.SelectSingleNode("multiplier");
     
     if (multiplierNode != null)
     {
         if (multiplierNode.Attributes["href"] != null || multiplierNode.Attributes["id"] != null) 
         {
             if (multiplierNode.Attributes["id"] != null) 
             {
                 multiplierIDRef_ = multiplierNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(multiplierNode);
                 IDManager.SetID(multiplierIDRef_, ob);
             }
             else if (multiplierNode.Attributes["href"] != null)
             {
                 multiplierIDRef_ = multiplierNode.Attributes["href"].Value;
             }
             else
             {
                 multiplier_ = new PositiveDecimal(multiplierNode);
             }
         }
         else
         {
             multiplier_ = new PositiveDecimal(multiplierNode);
         }
     }
     
 
     XmlNode extraordinaryEventsNode = xmlNode.SelectSingleNode("extraordinaryEvents");
     
     if (extraordinaryEventsNode != null)
     {
         if (extraordinaryEventsNode.Attributes["href"] != null || extraordinaryEventsNode.Attributes["id"] != null) 
         {
             if (extraordinaryEventsNode.Attributes["id"] != null) 
             {
                 extraordinaryEventsIDRef_ = extraordinaryEventsNode.Attributes["id"].Value;
                 ExtraordinaryEvents ob = new ExtraordinaryEvents(extraordinaryEventsNode);
                 IDManager.SetID(extraordinaryEventsIDRef_, ob);
             }
             else if (extraordinaryEventsNode.Attributes["href"] != null)
             {
                 extraordinaryEventsIDRef_ = extraordinaryEventsNode.Attributes["href"].Value;
             }
             else
             {
                 extraordinaryEvents_ = new ExtraordinaryEvents(extraordinaryEventsNode);
             }
         }
         else
         {
             extraordinaryEvents_ = new ExtraordinaryEvents(extraordinaryEventsNode);
         }
     }
     
 
 }
        public VarianceOptionTransactionSupplement(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList equityPremiumNodeList = xmlNode.SelectNodes("equityPremium");

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

            foreach (XmlNode item in equityPremiumNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        equityPremiumIDRef = item.Attributes["id"].Name;
                        EquityPremium ob = EquityPremium();
                        IDManager.SetID(equityPremiumIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        equityPremiumIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        equityPremium = new EquityPremium(item);
                    }
                }
            }


            XmlNodeList equityExerciseNodeList = xmlNode.SelectNodes("equityExercise");

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

            foreach (XmlNode item in equityExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        equityExerciseIDRef = item.Attributes["id"].Name;
                        EquityExerciseValuationSettlement ob = EquityExerciseValuationSettlement();
                        IDManager.SetID(equityExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        equityExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        equityExercise = new EquityExerciseValuationSettlement(item);
                    }
                }
            }


            XmlNodeList exchangeLookAlikeNodeList = xmlNode.SelectNodes("exchangeLookAlike");

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

            foreach (XmlNode item in exchangeLookAlikeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exchangeLookAlikeIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(exchangeLookAlikeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exchangeLookAlikeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exchangeLookAlike = new XsdTypeBoolean(item);
                    }
                }
            }


            XmlNodeList methodOfAdjustmentNodeList = xmlNode.SelectNodes("methodOfAdjustment");

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

            foreach (XmlNode item in methodOfAdjustmentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        methodOfAdjustmentIDRef = item.Attributes["id"].Name;
                        MethodOfAdjustmentEnum ob = MethodOfAdjustmentEnum();
                        IDManager.SetID(methodOfAdjustmentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        methodOfAdjustmentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        methodOfAdjustment = new MethodOfAdjustmentEnum(item);
                    }
                }
            }


            XmlNodeList optionEntitlementNodeList = xmlNode.SelectNodes("optionEntitlement");

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

            foreach (XmlNode item in optionEntitlementNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        optionEntitlementIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(optionEntitlementIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        optionEntitlementIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        optionEntitlement = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList multiplierNodeList = xmlNode.SelectNodes("multiplier");

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

            foreach (XmlNode item in multiplierNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        multiplierIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(multiplierIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        multiplierIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        multiplier = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList varianceSwapTransactionSupplementNodeList = xmlNode.SelectNodes("varianceSwapTransactionSupplement");

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

            foreach (XmlNode item in varianceSwapTransactionSupplementNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        varianceSwapTransactionSupplementIDRef = item.Attributes["id"].Name;
                        VarianceSwapTransactionSupplement ob = VarianceSwapTransactionSupplement();
                        IDManager.SetID(varianceSwapTransactionSupplementIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        varianceSwapTransactionSupplementIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        varianceSwapTransactionSupplement = new VarianceSwapTransactionSupplement(item);
                    }
                }
            }
        }
Exemple #20
0
        public FxBarrierFeature(XmlNode xmlNode)
        {
            XmlNodeList barrierTypeNodeList = xmlNode.SelectNodes("barrierType");

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

            foreach (XmlNode item in barrierTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        barrierTypeIDRef = item.Attributes["id"].Name;
                        FxBarrierTypeEnum ob = FxBarrierTypeEnum();
                        IDManager.SetID(barrierTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        barrierTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        barrierType = new FxBarrierTypeEnum(item);
                    }
                }
            }


            XmlNodeList quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");

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

            foreach (XmlNode item in quotedCurrencyPairNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                        QuotedCurrencyPair ob = QuotedCurrencyPair();
                        IDManager.SetID(quotedCurrencyPairIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        quotedCurrencyPairIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        quotedCurrencyPair = new QuotedCurrencyPair(item);
                    }
                }
            }


            XmlNodeList triggerRateNodeList = xmlNode.SelectNodes("triggerRate");

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

            foreach (XmlNode item in triggerRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        triggerRateIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(triggerRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        triggerRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        triggerRate = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList informationSourceNodeList = xmlNode.SelectNodes("informationSource");

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


            XmlNodeList observationStartDateNodeList = xmlNode.SelectNodes("observationStartDate");

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

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


            XmlNodeList observationEndDateNodeList = xmlNode.SelectNodes("observationEndDate");

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

            foreach (XmlNode item in observationEndDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        observationEndDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(observationEndDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        observationEndDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        observationEndDate = new XsdTypeDate(item);
                    }
                }
            }
        }
 public FxBarrierFeature(XmlNode xmlNode)
 {
     XmlNode barrierTypeNode = xmlNode.SelectSingleNode("barrierType");
     
     if (barrierTypeNode != null)
     {
         if (barrierTypeNode.Attributes["href"] != null || barrierTypeNode.Attributes["id"] != null) 
         {
             if (barrierTypeNode.Attributes["id"] != null) 
             {
                 barrierTypeIDRef_ = barrierTypeNode.Attributes["id"].Value;
                 FxBarrierTypeEnum ob = new FxBarrierTypeEnum(barrierTypeNode);
                 IDManager.SetID(barrierTypeIDRef_, ob);
             }
             else if (barrierTypeNode.Attributes["href"] != null)
             {
                 barrierTypeIDRef_ = barrierTypeNode.Attributes["href"].Value;
             }
             else
             {
                 barrierType_ = new FxBarrierTypeEnum(barrierTypeNode);
             }
         }
         else
         {
             barrierType_ = new FxBarrierTypeEnum(barrierTypeNode);
         }
     }
     
 
     XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");
     
     if (quotedCurrencyPairNode != null)
     {
         if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null) 
         {
             if (quotedCurrencyPairNode.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                 QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                 IDManager.SetID(quotedCurrencyPairIDRef_, ob);
             }
             else if (quotedCurrencyPairNode.Attributes["href"] != null)
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
             }
             else
             {
                 quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
             }
         }
         else
         {
             quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
         }
     }
     
 
     XmlNode triggerRateNode = xmlNode.SelectSingleNode("triggerRate");
     
     if (triggerRateNode != null)
     {
         if (triggerRateNode.Attributes["href"] != null || triggerRateNode.Attributes["id"] != null) 
         {
             if (triggerRateNode.Attributes["id"] != null) 
             {
                 triggerRateIDRef_ = triggerRateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(triggerRateNode);
                 IDManager.SetID(triggerRateIDRef_, ob);
             }
             else if (triggerRateNode.Attributes["href"] != null)
             {
                 triggerRateIDRef_ = triggerRateNode.Attributes["href"].Value;
             }
             else
             {
                 triggerRate_ = new PositiveDecimal(triggerRateNode);
             }
         }
         else
         {
             triggerRate_ = new PositiveDecimal(triggerRateNode);
         }
     }
     
 
     XmlNodeList informationSourceNodeList = xmlNode.SelectNodes("informationSource");
     
     if (informationSourceNodeList != null)
     {
         this.informationSource_ = new List<InformationSource>();
         foreach (XmlNode item in informationSourceNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     informationSourceIDRef_ = item.Attributes["id"].Value;
                     informationSource_.Add(new InformationSource(item));
                     IDManager.SetID(informationSourceIDRef_, informationSource_[informationSource_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     informationSourceIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 informationSource_.Add(new InformationSource(item));
                 }
             }
             else
             {
                 informationSource_.Add(new InformationSource(item));
             }
         }
     }
     
 
     XmlNode observationStartDateNode = xmlNode.SelectSingleNode("observationStartDate");
     
     if (observationStartDateNode != null)
     {
         if (observationStartDateNode.Attributes["href"] != null || observationStartDateNode.Attributes["id"] != null) 
         {
             if (observationStartDateNode.Attributes["id"] != null) 
             {
                 observationStartDateIDRef_ = observationStartDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(observationStartDateNode);
                 IDManager.SetID(observationStartDateIDRef_, ob);
             }
             else if (observationStartDateNode.Attributes["href"] != null)
             {
                 observationStartDateIDRef_ = observationStartDateNode.Attributes["href"].Value;
             }
             else
             {
                 observationStartDate_ = new XsdTypeDate(observationStartDateNode);
             }
         }
         else
         {
             observationStartDate_ = new XsdTypeDate(observationStartDateNode);
         }
     }
     
 
     XmlNode observationEndDateNode = xmlNode.SelectSingleNode("observationEndDate");
     
     if (observationEndDateNode != null)
     {
         if (observationEndDateNode.Attributes["href"] != null || observationEndDateNode.Attributes["id"] != null) 
         {
             if (observationEndDateNode.Attributes["id"] != null) 
             {
                 observationEndDateIDRef_ = observationEndDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(observationEndDateNode);
                 IDManager.SetID(observationEndDateIDRef_, ob);
             }
             else if (observationEndDateNode.Attributes["href"] != null)
             {
                 observationEndDateIDRef_ = observationEndDateNode.Attributes["href"].Value;
             }
             else
             {
                 observationEndDate_ = new XsdTypeDate(observationEndDateNode);
             }
         }
         else
         {
             observationEndDate_ = new XsdTypeDate(observationEndDateNode);
         }
     }
     
 
 }
Exemple #22
0
        public OptionBaseExtended(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium");

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

            foreach (XmlNode item in premiumNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        premiumIDRef = item.Attributes["id"].Name;
                        Premium ob = Premium();
                        IDManager.SetID(premiumIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        premiumIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        premium = new Premium(item);
                    }
                }
            }


            XmlNodeList exerciseNodeList = xmlNode.SelectNodes("exercise");

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

            foreach (XmlNode item in exerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exerciseIDRef = item.Attributes["id"].Name;
                        Exercise ob = Exercise();
                        IDManager.SetID(exerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exercise = new Exercise(item);
                    }
                }
            }


            XmlNodeList americanExerciseNodeList = xmlNode.SelectNodes("americanExercise");

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

            foreach (XmlNode item in americanExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        americanExerciseIDRef = item.Attributes["id"].Name;
                        AmericanExercise ob = AmericanExercise();
                        IDManager.SetID(americanExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        americanExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        americanExercise = new AmericanExercise(item);
                    }
                }
            }


            XmlNodeList bermudaExerciseNodeList = xmlNode.SelectNodes("bermudaExercise");

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

            foreach (XmlNode item in bermudaExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        bermudaExerciseIDRef = item.Attributes["id"].Name;
                        BermudaExercise ob = BermudaExercise();
                        IDManager.SetID(bermudaExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        bermudaExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        bermudaExercise = new BermudaExercise(item);
                    }
                }
            }


            XmlNodeList europeanExerciseNodeList = xmlNode.SelectNodes("europeanExercise");

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

            foreach (XmlNode item in europeanExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        europeanExerciseIDRef = item.Attributes["id"].Name;
                        EuropeanExercise ob = EuropeanExercise();
                        IDManager.SetID(europeanExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        europeanExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        europeanExercise = new EuropeanExercise(item);
                    }
                }
            }


            XmlNodeList exerciseProcedureNodeList = xmlNode.SelectNodes("exerciseProcedure");

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

            foreach (XmlNode item in exerciseProcedureNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exerciseProcedureIDRef = item.Attributes["id"].Name;
                        ExerciseProcedure ob = ExerciseProcedure();
                        IDManager.SetID(exerciseProcedureIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exerciseProcedureIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exerciseProcedure = new ExerciseProcedure(item);
                    }
                }
            }


            XmlNodeList featureNodeList = xmlNode.SelectNodes("feature");

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

            foreach (XmlNode item in featureNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        featureIDRef = item.Attributes["id"].Name;
                        OptionFeature ob = OptionFeature();
                        IDManager.SetID(featureIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        featureIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        feature = new OptionFeature(item);
                    }
                }
            }


            XmlNodeList notionalReferenceNodeList = xmlNode.SelectNodes("notionalReference");

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

            foreach (XmlNode item in notionalReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        notionalReferenceIDRef = item.Attributes["id"].Name;
                        NotionalAmountReference ob = NotionalAmountReference();
                        IDManager.SetID(notionalReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        notionalReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        notionalReference = new NotionalAmountReference(item);
                    }
                }
            }


            XmlNodeList notionalAmountNodeList = xmlNode.SelectNodes("notionalAmount");

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

            foreach (XmlNode item in notionalAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        notionalAmountIDRef = item.Attributes["id"].Name;
                        Money ob = Money();
                        IDManager.SetID(notionalAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        notionalAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        notionalAmount = new Money(item);
                    }
                }
            }


            XmlNodeList optionEntitlementNodeList = xmlNode.SelectNodes("optionEntitlement");

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

            foreach (XmlNode item in optionEntitlementNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        optionEntitlementIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(optionEntitlementIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        optionEntitlementIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        optionEntitlement = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList entitlementCurrencyNodeList = xmlNode.SelectNodes("entitlementCurrency");

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

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


            XmlNodeList numberOfOptionsNodeList = xmlNode.SelectNodes("numberOfOptions");

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

            foreach (XmlNode item in numberOfOptionsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        numberOfOptionsIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(numberOfOptionsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        numberOfOptionsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        numberOfOptions = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList settlementTypeNodeList = xmlNode.SelectNodes("settlementType");

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

            foreach (XmlNode item in settlementTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementTypeIDRef = item.Attributes["id"].Name;
                        SettlementTypeEnum ob = SettlementTypeEnum();
                        IDManager.SetID(settlementTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementType = new SettlementTypeEnum(item);
                    }
                }
            }


            XmlNodeList settlementDateNodeList = xmlNode.SelectNodes("settlementDate");

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

            foreach (XmlNode item in settlementDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementDateIDRef = item.Attributes["id"].Name;
                        AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                        IDManager.SetID(settlementDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementDate = new AdjustableOrRelativeDate(item);
                    }
                }
            }


            XmlNodeList settlementAmountNodeList = xmlNode.SelectNodes("settlementAmount");

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

            foreach (XmlNode item in settlementAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementAmountIDRef = item.Attributes["id"].Name;
                        Money ob = Money();
                        IDManager.SetID(settlementAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementAmount = new Money(item);
                    }
                }
            }


            XmlNodeList settlementCurrencyNodeList = xmlNode.SelectNodes("settlementCurrency");

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

            foreach (XmlNode item in settlementCurrencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementCurrencyIDRef = item.Attributes["id"].Name;
                        Currency ob = Currency();
                        IDManager.SetID(settlementCurrencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementCurrencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementCurrency = new Currency(item);
                    }
                }
            }
        }
 public Commodity(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode commodityBaseNode = xmlNode.SelectSingleNode("commodityBase");
     
     if (commodityBaseNode != null)
     {
         if (commodityBaseNode.Attributes["href"] != null || commodityBaseNode.Attributes["id"] != null) 
         {
             if (commodityBaseNode.Attributes["id"] != null) 
             {
                 commodityBaseIDRef_ = commodityBaseNode.Attributes["id"].Value;
                 CommodityBase ob = new CommodityBase(commodityBaseNode);
                 IDManager.SetID(commodityBaseIDRef_, ob);
             }
             else if (commodityBaseNode.Attributes["href"] != null)
             {
                 commodityBaseIDRef_ = commodityBaseNode.Attributes["href"].Value;
             }
             else
             {
                 commodityBase_ = new CommodityBase(commodityBaseNode);
             }
         }
         else
         {
             commodityBase_ = new CommodityBase(commodityBaseNode);
         }
     }
     
 
     XmlNode commodityDetailsNode = xmlNode.SelectSingleNode("commodityDetails");
     
     if (commodityDetailsNode != null)
     {
         if (commodityDetailsNode.Attributes["href"] != null || commodityDetailsNode.Attributes["id"] != null) 
         {
             if (commodityDetailsNode.Attributes["id"] != null) 
             {
                 commodityDetailsIDRef_ = commodityDetailsNode.Attributes["id"].Value;
                 CommodityDetails ob = new CommodityDetails(commodityDetailsNode);
                 IDManager.SetID(commodityDetailsIDRef_, ob);
             }
             else if (commodityDetailsNode.Attributes["href"] != null)
             {
                 commodityDetailsIDRef_ = commodityDetailsNode.Attributes["href"].Value;
             }
             else
             {
                 commodityDetails_ = new CommodityDetails(commodityDetailsNode);
             }
         }
         else
         {
             commodityDetails_ = new CommodityDetails(commodityDetailsNode);
         }
     }
     
 
     XmlNode unitNode = xmlNode.SelectSingleNode("unit");
     
     if (unitNode != null)
     {
         if (unitNode.Attributes["href"] != null || unitNode.Attributes["id"] != null) 
         {
             if (unitNode.Attributes["id"] != null) 
             {
                 unitIDRef_ = unitNode.Attributes["id"].Value;
                 QuantityUnit ob = new QuantityUnit(unitNode);
                 IDManager.SetID(unitIDRef_, ob);
             }
             else if (unitNode.Attributes["href"] != null)
             {
                 unitIDRef_ = unitNode.Attributes["href"].Value;
             }
             else
             {
                 unit_ = new QuantityUnit(unitNode);
             }
         }
         else
         {
             unit_ = new QuantityUnit(unitNode);
         }
     }
     
 
     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 exchangeIdNode = xmlNode.SelectSingleNode("exchangeId");
     
     if (exchangeIdNode != null)
     {
         if (exchangeIdNode.Attributes["href"] != null || exchangeIdNode.Attributes["id"] != null) 
         {
             if (exchangeIdNode.Attributes["id"] != null) 
             {
                 exchangeIdIDRef_ = exchangeIdNode.Attributes["id"].Value;
                 ExchangeId ob = new ExchangeId(exchangeIdNode);
                 IDManager.SetID(exchangeIdIDRef_, ob);
             }
             else if (exchangeIdNode.Attributes["href"] != null)
             {
                 exchangeIdIDRef_ = exchangeIdNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeId_ = new ExchangeId(exchangeIdNode);
             }
         }
         else
         {
             exchangeId_ = new ExchangeId(exchangeIdNode);
         }
     }
     
 
     XmlNode publicationNode = xmlNode.SelectSingleNode("publication");
     
     if (publicationNode != null)
     {
         if (publicationNode.Attributes["href"] != null || publicationNode.Attributes["id"] != null) 
         {
             if (publicationNode.Attributes["id"] != null) 
             {
                 publicationIDRef_ = publicationNode.Attributes["id"].Value;
                 CommodityInformationSource ob = new CommodityInformationSource(publicationNode);
                 IDManager.SetID(publicationIDRef_, ob);
             }
             else if (publicationNode.Attributes["href"] != null)
             {
                 publicationIDRef_ = publicationNode.Attributes["href"].Value;
             }
             else
             {
                 publication_ = new CommodityInformationSource(publicationNode);
             }
         }
         else
         {
             publication_ = new CommodityInformationSource(publicationNode);
         }
     }
     
 
     XmlNode specifiedPriceNode = xmlNode.SelectSingleNode("specifiedPrice");
     
     if (specifiedPriceNode != null)
     {
         if (specifiedPriceNode.Attributes["href"] != null || specifiedPriceNode.Attributes["id"] != null) 
         {
             if (specifiedPriceNode.Attributes["id"] != null) 
             {
                 specifiedPriceIDRef_ = specifiedPriceNode.Attributes["id"].Value;
                 SpecifiedPriceEnum ob = new SpecifiedPriceEnum(specifiedPriceNode);
                 IDManager.SetID(specifiedPriceIDRef_, ob);
             }
             else if (specifiedPriceNode.Attributes["href"] != null)
             {
                 specifiedPriceIDRef_ = specifiedPriceNode.Attributes["href"].Value;
             }
             else
             {
                 specifiedPrice_ = new SpecifiedPriceEnum(specifiedPriceNode);
             }
         }
         else
         {
             specifiedPrice_ = new SpecifiedPriceEnum(specifiedPriceNode);
         }
     }
     
 
     XmlNode deliveryDatesNode = xmlNode.SelectSingleNode("deliveryDates");
     
     if (deliveryDatesNode != null)
     {
         if (deliveryDatesNode.Attributes["href"] != null || deliveryDatesNode.Attributes["id"] != null) 
         {
             if (deliveryDatesNode.Attributes["id"] != null) 
             {
                 deliveryDatesIDRef_ = deliveryDatesNode.Attributes["id"].Value;
                 DeliveryDatesEnum ob = new DeliveryDatesEnum(deliveryDatesNode);
                 IDManager.SetID(deliveryDatesIDRef_, ob);
             }
             else if (deliveryDatesNode.Attributes["href"] != null)
             {
                 deliveryDatesIDRef_ = deliveryDatesNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDates_ = new DeliveryDatesEnum(deliveryDatesNode);
             }
         }
         else
         {
             deliveryDates_ = new DeliveryDatesEnum(deliveryDatesNode);
         }
     }
     
 
     XmlNode deliveryDateNode = xmlNode.SelectSingleNode("deliveryDate");
     
     if (deliveryDateNode != null)
     {
         if (deliveryDateNode.Attributes["href"] != null || deliveryDateNode.Attributes["id"] != null) 
         {
             if (deliveryDateNode.Attributes["id"] != null) 
             {
                 deliveryDateIDRef_ = deliveryDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(deliveryDateNode);
                 IDManager.SetID(deliveryDateIDRef_, ob);
             }
             else if (deliveryDateNode.Attributes["href"] != null)
             {
                 deliveryDateIDRef_ = deliveryDateNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDate_ = new AdjustableDate(deliveryDateNode);
             }
         }
         else
         {
             deliveryDate_ = new AdjustableDate(deliveryDateNode);
         }
     }
     
 
     XmlNode deliveryDateYearMonthNode = xmlNode.SelectSingleNode("deliveryDateYearMonth");
     
     if (deliveryDateYearMonthNode != null)
     {
         if (deliveryDateYearMonthNode.Attributes["href"] != null || deliveryDateYearMonthNode.Attributes["id"] != null) 
         {
             if (deliveryDateYearMonthNode.Attributes["id"] != null) 
             {
                 deliveryDateYearMonthIDRef_ = deliveryDateYearMonthNode.Attributes["id"].Value;
                 XsdTypeGYearMonth ob = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
                 IDManager.SetID(deliveryDateYearMonthIDRef_, ob);
             }
             else if (deliveryDateYearMonthNode.Attributes["href"] != null)
             {
                 deliveryDateYearMonthIDRef_ = deliveryDateYearMonthNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDateYearMonth_ = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
             }
         }
         else
         {
             deliveryDateYearMonth_ = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
         }
     }
     
 
     XmlNode deliveryDateRollConventionNode = xmlNode.SelectSingleNode("deliveryDateRollConvention");
     
     if (deliveryDateRollConventionNode != null)
     {
         if (deliveryDateRollConventionNode.Attributes["href"] != null || deliveryDateRollConventionNode.Attributes["id"] != null) 
         {
             if (deliveryDateRollConventionNode.Attributes["id"] != null) 
             {
                 deliveryDateRollConventionIDRef_ = deliveryDateRollConventionNode.Attributes["id"].Value;
                 Offset ob = new Offset(deliveryDateRollConventionNode);
                 IDManager.SetID(deliveryDateRollConventionIDRef_, ob);
             }
             else if (deliveryDateRollConventionNode.Attributes["href"] != null)
             {
                 deliveryDateRollConventionIDRef_ = deliveryDateRollConventionNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDateRollConvention_ = new Offset(deliveryDateRollConventionNode);
             }
         }
         else
         {
             deliveryDateRollConvention_ = new Offset(deliveryDateRollConventionNode);
         }
     }
     
 
     XmlNode multiplierNode = xmlNode.SelectSingleNode("multiplier");
     
     if (multiplierNode != null)
     {
         if (multiplierNode.Attributes["href"] != null || multiplierNode.Attributes["id"] != null) 
         {
             if (multiplierNode.Attributes["id"] != null) 
             {
                 multiplierIDRef_ = multiplierNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(multiplierNode);
                 IDManager.SetID(multiplierIDRef_, ob);
             }
             else if (multiplierNode.Attributes["href"] != null)
             {
                 multiplierIDRef_ = multiplierNode.Attributes["href"].Value;
             }
             else
             {
                 multiplier_ = new PositiveDecimal(multiplierNode);
             }
         }
         else
         {
             multiplier_ = new PositiveDecimal(multiplierNode);
         }
     }
     
 
 }
 public TermDeposit(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");
     
     if (payerPartyReferenceNode != null)
     {
         if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (payerPartyReferenceNode.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(payerPartyReferenceNode);
                 IDManager.SetID(payerPartyReferenceIDRef_, ob);
             }
             else if (payerPartyReferenceNode.Attributes["href"] != null)
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
             }
         }
         else
         {
             payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
         }
     }
     
 
     XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");
     
     if (payerAccountReferenceNode != null)
     {
         if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (payerAccountReferenceNode.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(payerAccountReferenceNode);
                 IDManager.SetID(payerAccountReferenceIDRef_, ob);
             }
             else if (payerAccountReferenceNode.Attributes["href"] != null)
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
             }
         }
         else
         {
             payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
         }
     }
     
 
     XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");
     
     if (receiverPartyReferenceNode != null)
     {
         if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) 
         {
             if (receiverPartyReferenceNode.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                 IDManager.SetID(receiverPartyReferenceIDRef_, ob);
             }
             else if (receiverPartyReferenceNode.Attributes["href"] != null)
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
             }
         }
         else
         {
             receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
         }
     }
     
 
     XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");
     
     if (receiverAccountReferenceNode != null)
     {
         if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) 
         {
             if (receiverAccountReferenceNode.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                 IDManager.SetID(receiverAccountReferenceIDRef_, ob);
             }
             else if (receiverAccountReferenceNode.Attributes["href"] != null)
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
             }
         }
         else
         {
             receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
         }
     }
     
 
     XmlNode startDateNode = xmlNode.SelectSingleNode("startDate");
     
     if (startDateNode != null)
     {
         if (startDateNode.Attributes["href"] != null || startDateNode.Attributes["id"] != null) 
         {
             if (startDateNode.Attributes["id"] != null) 
             {
                 startDateIDRef_ = startDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(startDateNode);
                 IDManager.SetID(startDateIDRef_, ob);
             }
             else if (startDateNode.Attributes["href"] != null)
             {
                 startDateIDRef_ = startDateNode.Attributes["href"].Value;
             }
             else
             {
                 startDate_ = new XsdTypeDate(startDateNode);
             }
         }
         else
         {
             startDate_ = new XsdTypeDate(startDateNode);
         }
     }
     
 
     XmlNode maturityDateNode = xmlNode.SelectSingleNode("maturityDate");
     
     if (maturityDateNode != null)
     {
         if (maturityDateNode.Attributes["href"] != null || maturityDateNode.Attributes["id"] != null) 
         {
             if (maturityDateNode.Attributes["id"] != null) 
             {
                 maturityDateIDRef_ = maturityDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(maturityDateNode);
                 IDManager.SetID(maturityDateIDRef_, ob);
             }
             else if (maturityDateNode.Attributes["href"] != null)
             {
                 maturityDateIDRef_ = maturityDateNode.Attributes["href"].Value;
             }
             else
             {
                 maturityDate_ = new XsdTypeDate(maturityDateNode);
             }
         }
         else
         {
             maturityDate_ = new XsdTypeDate(maturityDateNode);
         }
     }
     
 
     XmlNode tenorNameNode = xmlNode.SelectSingleNode("tenorName");
     
     if (tenorNameNode != null)
     {
         if (tenorNameNode.Attributes["href"] != null || tenorNameNode.Attributes["id"] != null) 
         {
             if (tenorNameNode.Attributes["id"] != null) 
             {
                 tenorNameIDRef_ = tenorNameNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(tenorNameNode);
                 IDManager.SetID(tenorNameIDRef_, ob);
             }
             else if (tenorNameNode.Attributes["href"] != null)
             {
                 tenorNameIDRef_ = tenorNameNode.Attributes["href"].Value;
             }
             else
             {
                 tenorName_ = new XsdTypeBoolean(tenorNameNode);
             }
         }
         else
         {
             tenorName_ = new XsdTypeBoolean(tenorNameNode);
         }
     }
     
 
     XmlNode tenorPeriodNode = xmlNode.SelectSingleNode("tenorPeriod");
     
     if (tenorPeriodNode != null)
     {
         if (tenorPeriodNode.Attributes["href"] != null || tenorPeriodNode.Attributes["id"] != null) 
         {
             if (tenorPeriodNode.Attributes["id"] != null) 
             {
                 tenorPeriodIDRef_ = tenorPeriodNode.Attributes["id"].Value;
                 Period ob = new Period(tenorPeriodNode);
                 IDManager.SetID(tenorPeriodIDRef_, ob);
             }
             else if (tenorPeriodNode.Attributes["href"] != null)
             {
                 tenorPeriodIDRef_ = tenorPeriodNode.Attributes["href"].Value;
             }
             else
             {
                 tenorPeriod_ = new Period(tenorPeriodNode);
             }
         }
         else
         {
             tenorPeriod_ = new Period(tenorPeriodNode);
         }
     }
     
 
     XmlNode principalNode = xmlNode.SelectSingleNode("principal");
     
     if (principalNode != null)
     {
         if (principalNode.Attributes["href"] != null || principalNode.Attributes["id"] != null) 
         {
             if (principalNode.Attributes["id"] != null) 
             {
                 principalIDRef_ = principalNode.Attributes["id"].Value;
                 PositiveMoney ob = new PositiveMoney(principalNode);
                 IDManager.SetID(principalIDRef_, ob);
             }
             else if (principalNode.Attributes["href"] != null)
             {
                 principalIDRef_ = principalNode.Attributes["href"].Value;
             }
             else
             {
                 principal_ = new PositiveMoney(principalNode);
             }
         }
         else
         {
             principal_ = new PositiveMoney(principalNode);
         }
     }
     
 
     XmlNode fixedRateNode = xmlNode.SelectSingleNode("fixedRate");
     
     if (fixedRateNode != null)
     {
         if (fixedRateNode.Attributes["href"] != null || fixedRateNode.Attributes["id"] != null) 
         {
             if (fixedRateNode.Attributes["id"] != null) 
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(fixedRateNode);
                 IDManager.SetID(fixedRateIDRef_, ob);
             }
             else if (fixedRateNode.Attributes["href"] != null)
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["href"].Value;
             }
             else
             {
                 fixedRate_ = new PositiveDecimal(fixedRateNode);
             }
         }
         else
         {
             fixedRate_ = new PositiveDecimal(fixedRateNode);
         }
     }
     
 
     XmlNode dayCountFractionNode = xmlNode.SelectSingleNode("dayCountFraction");
     
     if (dayCountFractionNode != null)
     {
         if (dayCountFractionNode.Attributes["href"] != null || dayCountFractionNode.Attributes["id"] != null) 
         {
             if (dayCountFractionNode.Attributes["id"] != null) 
             {
                 dayCountFractionIDRef_ = dayCountFractionNode.Attributes["id"].Value;
                 DayCountFraction ob = new DayCountFraction(dayCountFractionNode);
                 IDManager.SetID(dayCountFractionIDRef_, ob);
             }
             else if (dayCountFractionNode.Attributes["href"] != null)
             {
                 dayCountFractionIDRef_ = dayCountFractionNode.Attributes["href"].Value;
             }
             else
             {
                 dayCountFraction_ = new DayCountFraction(dayCountFractionNode);
             }
         }
         else
         {
             dayCountFraction_ = new DayCountFraction(dayCountFractionNode);
         }
     }
     
 
     XmlNode featuresNode = xmlNode.SelectSingleNode("features");
     
     if (featuresNode != null)
     {
         if (featuresNode.Attributes["href"] != null || featuresNode.Attributes["id"] != null) 
         {
             if (featuresNode.Attributes["id"] != null) 
             {
                 featuresIDRef_ = featuresNode.Attributes["id"].Value;
                 TermDepositFeatures ob = new TermDepositFeatures(featuresNode);
                 IDManager.SetID(featuresIDRef_, ob);
             }
             else if (featuresNode.Attributes["href"] != null)
             {
                 featuresIDRef_ = featuresNode.Attributes["href"].Value;
             }
             else
             {
                 features_ = new TermDepositFeatures(featuresNode);
             }
         }
         else
         {
             features_ = new TermDepositFeatures(featuresNode);
         }
     }
     
 
     XmlNode interestNode = xmlNode.SelectSingleNode("interest");
     
     if (interestNode != null)
     {
         if (interestNode.Attributes["href"] != null || interestNode.Attributes["id"] != null) 
         {
             if (interestNode.Attributes["id"] != null) 
             {
                 interestIDRef_ = interestNode.Attributes["id"].Value;
                 Money ob = new Money(interestNode);
                 IDManager.SetID(interestIDRef_, ob);
             }
             else if (interestNode.Attributes["href"] != null)
             {
                 interestIDRef_ = interestNode.Attributes["href"].Value;
             }
             else
             {
                 interest_ = new Money(interestNode);
             }
         }
         else
         {
             interest_ = new Money(interestNode);
         }
     }
     
 
     XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");
     
     if (paymentNodeList != null)
     {
         this.payment_ = new List<Payment>();
         foreach (XmlNode item in paymentNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     paymentIDRef_ = item.Attributes["id"].Value;
                     payment_.Add(new Payment(item));
                     IDManager.SetID(paymentIDRef_, payment_[payment_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     paymentIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 payment_.Add(new Payment(item));
                 }
             }
             else
             {
                 payment_.Add(new Payment(item));
             }
         }
     }
     
 
 }
        public ExchangeRate(XmlNode xmlNode)
        {
            XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");

            if (quotedCurrencyPairNode != null)
            {
                if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null)
                {
                    if (quotedCurrencyPairNode.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                        QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                        IDManager.SetID(quotedCurrencyPairIDRef_, ob);
                    }
                    else if (quotedCurrencyPairNode.Attributes["href"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                    }
                }
                else
                {
                    quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                }
            }


            XmlNode rateNode = xmlNode.SelectSingleNode("rate");

            if (rateNode != null)
            {
                if (rateNode.Attributes["href"] != null || rateNode.Attributes["id"] != null)
                {
                    if (rateNode.Attributes["id"] != null)
                    {
                        rateIDRef_ = rateNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(rateNode);
                        IDManager.SetID(rateIDRef_, ob);
                    }
                    else if (rateNode.Attributes["href"] != null)
                    {
                        rateIDRef_ = rateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rate_ = new PositiveDecimal(rateNode);
                    }
                }
                else
                {
                    rate_ = new PositiveDecimal(rateNode);
                }
            }


            XmlNode spotRateNode = xmlNode.SelectSingleNode("spotRate");

            if (spotRateNode != null)
            {
                if (spotRateNode.Attributes["href"] != null || spotRateNode.Attributes["id"] != null)
                {
                    if (spotRateNode.Attributes["id"] != null)
                    {
                        spotRateIDRef_ = spotRateNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(spotRateNode);
                        IDManager.SetID(spotRateIDRef_, ob);
                    }
                    else if (spotRateNode.Attributes["href"] != null)
                    {
                        spotRateIDRef_ = spotRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        spotRate_ = new PositiveDecimal(spotRateNode);
                    }
                }
                else
                {
                    spotRate_ = new PositiveDecimal(spotRateNode);
                }
            }


            XmlNode forwardPointsNode = xmlNode.SelectSingleNode("forwardPoints");

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


            XmlNode pointValueNode = xmlNode.SelectSingleNode("pointValue");

            if (pointValueNode != null)
            {
                if (pointValueNode.Attributes["href"] != null || pointValueNode.Attributes["id"] != null)
                {
                    if (pointValueNode.Attributes["id"] != null)
                    {
                        pointValueIDRef_ = pointValueNode.Attributes["id"].Value;
                        PointValue ob = new PointValue(pointValueNode);
                        IDManager.SetID(pointValueIDRef_, ob);
                    }
                    else if (pointValueNode.Attributes["href"] != null)
                    {
                        pointValueIDRef_ = pointValueNode.Attributes["href"].Value;
                    }
                    else
                    {
                        pointValue_ = new PointValue(pointValueNode);
                    }
                }
                else
                {
                    pointValue_ = new PointValue(pointValueNode);
                }
            }


            XmlNodeList crossRateNodeList = xmlNode.SelectNodes("crossRate");

            if (crossRateNodeList != null)
            {
                this.crossRate_ = new List <CrossRate>();
                foreach (XmlNode item in crossRateNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            crossRateIDRef_ = item.Attributes["id"].Value;
                            crossRate_.Add(new CrossRate(item));
                            IDManager.SetID(crossRateIDRef_, crossRate_[crossRate_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            crossRateIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            crossRate_.Add(new CrossRate(item));
                        }
                    }
                    else
                    {
                        crossRate_.Add(new CrossRate(item));
                    }
                }
            }
        }
        public Commodity(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode commodityBaseNode = xmlNode.SelectSingleNode("commodityBase");

            if (commodityBaseNode != null)
            {
                if (commodityBaseNode.Attributes["href"] != null || commodityBaseNode.Attributes["id"] != null)
                {
                    if (commodityBaseNode.Attributes["id"] != null)
                    {
                        commodityBaseIDRef_ = commodityBaseNode.Attributes["id"].Value;
                        CommodityBase ob = new CommodityBase(commodityBaseNode);
                        IDManager.SetID(commodityBaseIDRef_, ob);
                    }
                    else if (commodityBaseNode.Attributes["href"] != null)
                    {
                        commodityBaseIDRef_ = commodityBaseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        commodityBase_ = new CommodityBase(commodityBaseNode);
                    }
                }
                else
                {
                    commodityBase_ = new CommodityBase(commodityBaseNode);
                }
            }


            XmlNode commodityDetailsNode = xmlNode.SelectSingleNode("commodityDetails");

            if (commodityDetailsNode != null)
            {
                if (commodityDetailsNode.Attributes["href"] != null || commodityDetailsNode.Attributes["id"] != null)
                {
                    if (commodityDetailsNode.Attributes["id"] != null)
                    {
                        commodityDetailsIDRef_ = commodityDetailsNode.Attributes["id"].Value;
                        CommodityDetails ob = new CommodityDetails(commodityDetailsNode);
                        IDManager.SetID(commodityDetailsIDRef_, ob);
                    }
                    else if (commodityDetailsNode.Attributes["href"] != null)
                    {
                        commodityDetailsIDRef_ = commodityDetailsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        commodityDetails_ = new CommodityDetails(commodityDetailsNode);
                    }
                }
                else
                {
                    commodityDetails_ = new CommodityDetails(commodityDetailsNode);
                }
            }


            XmlNode unitNode = xmlNode.SelectSingleNode("unit");

            if (unitNode != null)
            {
                if (unitNode.Attributes["href"] != null || unitNode.Attributes["id"] != null)
                {
                    if (unitNode.Attributes["id"] != null)
                    {
                        unitIDRef_ = unitNode.Attributes["id"].Value;
                        QuantityUnit ob = new QuantityUnit(unitNode);
                        IDManager.SetID(unitIDRef_, ob);
                    }
                    else if (unitNode.Attributes["href"] != null)
                    {
                        unitIDRef_ = unitNode.Attributes["href"].Value;
                    }
                    else
                    {
                        unit_ = new QuantityUnit(unitNode);
                    }
                }
                else
                {
                    unit_ = new QuantityUnit(unitNode);
                }
            }


            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 exchangeIdNode = xmlNode.SelectSingleNode("exchangeId");

            if (exchangeIdNode != null)
            {
                if (exchangeIdNode.Attributes["href"] != null || exchangeIdNode.Attributes["id"] != null)
                {
                    if (exchangeIdNode.Attributes["id"] != null)
                    {
                        exchangeIdIDRef_ = exchangeIdNode.Attributes["id"].Value;
                        ExchangeId ob = new ExchangeId(exchangeIdNode);
                        IDManager.SetID(exchangeIdIDRef_, ob);
                    }
                    else if (exchangeIdNode.Attributes["href"] != null)
                    {
                        exchangeIdIDRef_ = exchangeIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangeId_ = new ExchangeId(exchangeIdNode);
                    }
                }
                else
                {
                    exchangeId_ = new ExchangeId(exchangeIdNode);
                }
            }


            XmlNode publicationNode = xmlNode.SelectSingleNode("publication");

            if (publicationNode != null)
            {
                if (publicationNode.Attributes["href"] != null || publicationNode.Attributes["id"] != null)
                {
                    if (publicationNode.Attributes["id"] != null)
                    {
                        publicationIDRef_ = publicationNode.Attributes["id"].Value;
                        CommodityInformationSource ob = new CommodityInformationSource(publicationNode);
                        IDManager.SetID(publicationIDRef_, ob);
                    }
                    else if (publicationNode.Attributes["href"] != null)
                    {
                        publicationIDRef_ = publicationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        publication_ = new CommodityInformationSource(publicationNode);
                    }
                }
                else
                {
                    publication_ = new CommodityInformationSource(publicationNode);
                }
            }


            XmlNode specifiedPriceNode = xmlNode.SelectSingleNode("specifiedPrice");

            if (specifiedPriceNode != null)
            {
                if (specifiedPriceNode.Attributes["href"] != null || specifiedPriceNode.Attributes["id"] != null)
                {
                    if (specifiedPriceNode.Attributes["id"] != null)
                    {
                        specifiedPriceIDRef_ = specifiedPriceNode.Attributes["id"].Value;
                        SpecifiedPriceEnum ob = new SpecifiedPriceEnum(specifiedPriceNode);
                        IDManager.SetID(specifiedPriceIDRef_, ob);
                    }
                    else if (specifiedPriceNode.Attributes["href"] != null)
                    {
                        specifiedPriceIDRef_ = specifiedPriceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        specifiedPrice_ = new SpecifiedPriceEnum(specifiedPriceNode);
                    }
                }
                else
                {
                    specifiedPrice_ = new SpecifiedPriceEnum(specifiedPriceNode);
                }
            }


            XmlNode deliveryDatesNode = xmlNode.SelectSingleNode("deliveryDates");

            if (deliveryDatesNode != null)
            {
                if (deliveryDatesNode.Attributes["href"] != null || deliveryDatesNode.Attributes["id"] != null)
                {
                    if (deliveryDatesNode.Attributes["id"] != null)
                    {
                        deliveryDatesIDRef_ = deliveryDatesNode.Attributes["id"].Value;
                        DeliveryDatesEnum ob = new DeliveryDatesEnum(deliveryDatesNode);
                        IDManager.SetID(deliveryDatesIDRef_, ob);
                    }
                    else if (deliveryDatesNode.Attributes["href"] != null)
                    {
                        deliveryDatesIDRef_ = deliveryDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryDates_ = new DeliveryDatesEnum(deliveryDatesNode);
                    }
                }
                else
                {
                    deliveryDates_ = new DeliveryDatesEnum(deliveryDatesNode);
                }
            }


            XmlNode deliveryDateNode = xmlNode.SelectSingleNode("deliveryDate");

            if (deliveryDateNode != null)
            {
                if (deliveryDateNode.Attributes["href"] != null || deliveryDateNode.Attributes["id"] != null)
                {
                    if (deliveryDateNode.Attributes["id"] != null)
                    {
                        deliveryDateIDRef_ = deliveryDateNode.Attributes["id"].Value;
                        AdjustableDate ob = new AdjustableDate(deliveryDateNode);
                        IDManager.SetID(deliveryDateIDRef_, ob);
                    }
                    else if (deliveryDateNode.Attributes["href"] != null)
                    {
                        deliveryDateIDRef_ = deliveryDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryDate_ = new AdjustableDate(deliveryDateNode);
                    }
                }
                else
                {
                    deliveryDate_ = new AdjustableDate(deliveryDateNode);
                }
            }


            XmlNode deliveryDateYearMonthNode = xmlNode.SelectSingleNode("deliveryDateYearMonth");

            if (deliveryDateYearMonthNode != null)
            {
                if (deliveryDateYearMonthNode.Attributes["href"] != null || deliveryDateYearMonthNode.Attributes["id"] != null)
                {
                    if (deliveryDateYearMonthNode.Attributes["id"] != null)
                    {
                        deliveryDateYearMonthIDRef_ = deliveryDateYearMonthNode.Attributes["id"].Value;
                        XsdTypeGYearMonth ob = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
                        IDManager.SetID(deliveryDateYearMonthIDRef_, ob);
                    }
                    else if (deliveryDateYearMonthNode.Attributes["href"] != null)
                    {
                        deliveryDateYearMonthIDRef_ = deliveryDateYearMonthNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryDateYearMonth_ = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
                    }
                }
                else
                {
                    deliveryDateYearMonth_ = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
                }
            }


            XmlNode deliveryDateRollConventionNode = xmlNode.SelectSingleNode("deliveryDateRollConvention");

            if (deliveryDateRollConventionNode != null)
            {
                if (deliveryDateRollConventionNode.Attributes["href"] != null || deliveryDateRollConventionNode.Attributes["id"] != null)
                {
                    if (deliveryDateRollConventionNode.Attributes["id"] != null)
                    {
                        deliveryDateRollConventionIDRef_ = deliveryDateRollConventionNode.Attributes["id"].Value;
                        Offset ob = new Offset(deliveryDateRollConventionNode);
                        IDManager.SetID(deliveryDateRollConventionIDRef_, ob);
                    }
                    else if (deliveryDateRollConventionNode.Attributes["href"] != null)
                    {
                        deliveryDateRollConventionIDRef_ = deliveryDateRollConventionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryDateRollConvention_ = new Offset(deliveryDateRollConventionNode);
                    }
                }
                else
                {
                    deliveryDateRollConvention_ = new Offset(deliveryDateRollConventionNode);
                }
            }


            XmlNode multiplierNode = xmlNode.SelectSingleNode("multiplier");

            if (multiplierNode != null)
            {
                if (multiplierNode.Attributes["href"] != null || multiplierNode.Attributes["id"] != null)
                {
                    if (multiplierNode.Attributes["id"] != null)
                    {
                        multiplierIDRef_ = multiplierNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(multiplierNode);
                        IDManager.SetID(multiplierIDRef_, ob);
                    }
                    else if (multiplierNode.Attributes["href"] != null)
                    {
                        multiplierIDRef_ = multiplierNode.Attributes["href"].Value;
                    }
                    else
                    {
                        multiplier_ = new PositiveDecimal(multiplierNode);
                    }
                }
                else
                {
                    multiplier_ = new PositiveDecimal(multiplierNode);
                }
            }
        }
 public ExchangeRate(XmlNode xmlNode)
 {
     XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");
     
     if (quotedCurrencyPairNode != null)
     {
         if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null) 
         {
             if (quotedCurrencyPairNode.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                 QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                 IDManager.SetID(quotedCurrencyPairIDRef_, ob);
             }
             else if (quotedCurrencyPairNode.Attributes["href"] != null)
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
             }
             else
             {
                 quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
             }
         }
         else
         {
             quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
         }
     }
     
 
     XmlNode rateNode = xmlNode.SelectSingleNode("rate");
     
     if (rateNode != null)
     {
         if (rateNode.Attributes["href"] != null || rateNode.Attributes["id"] != null) 
         {
             if (rateNode.Attributes["id"] != null) 
             {
                 rateIDRef_ = rateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(rateNode);
                 IDManager.SetID(rateIDRef_, ob);
             }
             else if (rateNode.Attributes["href"] != null)
             {
                 rateIDRef_ = rateNode.Attributes["href"].Value;
             }
             else
             {
                 rate_ = new PositiveDecimal(rateNode);
             }
         }
         else
         {
             rate_ = new PositiveDecimal(rateNode);
         }
     }
     
 
     XmlNode spotRateNode = xmlNode.SelectSingleNode("spotRate");
     
     if (spotRateNode != null)
     {
         if (spotRateNode.Attributes["href"] != null || spotRateNode.Attributes["id"] != null) 
         {
             if (spotRateNode.Attributes["id"] != null) 
             {
                 spotRateIDRef_ = spotRateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(spotRateNode);
                 IDManager.SetID(spotRateIDRef_, ob);
             }
             else if (spotRateNode.Attributes["href"] != null)
             {
                 spotRateIDRef_ = spotRateNode.Attributes["href"].Value;
             }
             else
             {
                 spotRate_ = new PositiveDecimal(spotRateNode);
             }
         }
         else
         {
             spotRate_ = new PositiveDecimal(spotRateNode);
         }
     }
     
 
     XmlNode forwardPointsNode = xmlNode.SelectSingleNode("forwardPoints");
     
     if (forwardPointsNode != null)
     {
         if (forwardPointsNode.Attributes["href"] != null || forwardPointsNode.Attributes["id"] != null) 
         {
             if (forwardPointsNode.Attributes["id"] != null) 
             {
                 forwardPointsIDRef_ = forwardPointsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(forwardPointsNode);
                 IDManager.SetID(forwardPointsIDRef_, ob);
             }
             else if (forwardPointsNode.Attributes["href"] != null)
             {
                 forwardPointsIDRef_ = forwardPointsNode.Attributes["href"].Value;
             }
             else
             {
                 forwardPoints_ = new XsdTypeDecimal(forwardPointsNode);
             }
         }
         else
         {
             forwardPoints_ = new XsdTypeDecimal(forwardPointsNode);
         }
     }
     
 
     XmlNode pointValueNode = xmlNode.SelectSingleNode("pointValue");
     
     if (pointValueNode != null)
     {
         if (pointValueNode.Attributes["href"] != null || pointValueNode.Attributes["id"] != null) 
         {
             if (pointValueNode.Attributes["id"] != null) 
             {
                 pointValueIDRef_ = pointValueNode.Attributes["id"].Value;
                 PointValue ob = new PointValue(pointValueNode);
                 IDManager.SetID(pointValueIDRef_, ob);
             }
             else if (pointValueNode.Attributes["href"] != null)
             {
                 pointValueIDRef_ = pointValueNode.Attributes["href"].Value;
             }
             else
             {
                 pointValue_ = new PointValue(pointValueNode);
             }
         }
         else
         {
             pointValue_ = new PointValue(pointValueNode);
         }
     }
     
 
     XmlNodeList crossRateNodeList = xmlNode.SelectNodes("crossRate");
     
     if (crossRateNodeList != null)
     {
         this.crossRate_ = new List<CrossRate>();
         foreach (XmlNode item in crossRateNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     crossRateIDRef_ = item.Attributes["id"].Value;
                     crossRate_.Add(new CrossRate(item));
                     IDManager.SetID(crossRateIDRef_, crossRate_[crossRate_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     crossRateIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 crossRate_.Add(new CrossRate(item));
                 }
             }
             else
             {
                 crossRate_.Add(new CrossRate(item));
             }
         }
     }
     
 
 }
Exemple #28
0
        public PositiveSchedule(XmlNode xmlNode)
        {
            XmlNode initialValueNode = xmlNode.SelectSingleNode("initialValue");

            if (initialValueNode != null)
            {
                if (initialValueNode.Attributes["href"] != null || initialValueNode.Attributes["id"] != null)
                {
                    if (initialValueNode.Attributes["id"] != null)
                    {
                        initialValueIDRef_ = initialValueNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(initialValueNode);
                        IDManager.SetID(initialValueIDRef_, ob);
                    }
                    else if (initialValueNode.Attributes["href"] != null)
                    {
                        initialValueIDRef_ = initialValueNode.Attributes["href"].Value;
                    }
                    else
                    {
                        initialValue_ = new PositiveDecimal(initialValueNode);
                    }
                }
                else
                {
                    initialValue_ = new PositiveDecimal(initialValueNode);
                }
            }


            XmlNodeList stepNodeList = xmlNode.SelectNodes("step");

            if (stepNodeList != null)
            {
                this.step_ = new List <PositiveStep>();
                foreach (XmlNode item in stepNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            stepIDRef_ = item.Attributes["id"].Value;
                            step_.Add(new PositiveStep(item));
                            IDManager.SetID(stepIDRef_, step_[step_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            stepIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            step_.Add(new PositiveStep(item));
                        }
                    }
                    else
                    {
                        step_.Add(new PositiveStep(item));
                    }
                }
            }
        }
Exemple #29
0
        public CrossRate(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList rateNodeList = xmlNode.SelectNodes("rate");

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

            foreach (XmlNode item in rateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(rateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rate = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList spotRateNodeList = xmlNode.SelectNodes("spotRate");

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

            foreach (XmlNode item in spotRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        spotRateIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(spotRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        spotRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        spotRate = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList forwardPointsNodeList = xmlNode.SelectNodes("forwardPoints");

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

            foreach (XmlNode item in forwardPointsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        forwardPointsIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(forwardPointsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        forwardPointsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        forwardPoints = new XsdTypeDecimal(item);
                    }
                }
            }
        }
        public Variance(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList varianceAmountNodeList = xmlNode.SelectNodes("varianceAmount");

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

            foreach (XmlNode item in varianceAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        varianceAmountIDRef = item.Attributes["id"].Name;
                        NonNegativeMoney ob = NonNegativeMoney();
                        IDManager.SetID(varianceAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        varianceAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        varianceAmount = new NonNegativeMoney(item);
                    }
                }
            }


            XmlNodeList volatilityStrikePriceNodeList = xmlNode.SelectNodes("volatilityStrikePrice");

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

            foreach (XmlNode item in volatilityStrikePriceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        volatilityStrikePriceIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(volatilityStrikePriceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        volatilityStrikePriceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        volatilityStrikePrice = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList varianceStrikePriceNodeList = xmlNode.SelectNodes("varianceStrikePrice");

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

            foreach (XmlNode item in varianceStrikePriceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        varianceStrikePriceIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(varianceStrikePriceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        varianceStrikePriceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        varianceStrikePrice = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList varianceCapNodeList = xmlNode.SelectNodes("varianceCap");

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

            foreach (XmlNode item in varianceCapNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        varianceCapIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(varianceCapIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        varianceCapIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        varianceCap = new XsdTypeBoolean(item);
                    }
                }
            }


            XmlNodeList unadjustedVarianceCapNodeList = xmlNode.SelectNodes("unadjustedVarianceCap");

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

            foreach (XmlNode item in unadjustedVarianceCapNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        unadjustedVarianceCapIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(unadjustedVarianceCapIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        unadjustedVarianceCapIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        unadjustedVarianceCap = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList boundedVarianceNodeList = xmlNode.SelectNodes("boundedVariance");

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

            foreach (XmlNode item in boundedVarianceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        boundedVarianceIDRef = item.Attributes["id"].Name;
                        BoundedVariance ob = BoundedVariance();
                        IDManager.SetID(boundedVarianceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        boundedVarianceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        boundedVariance = new BoundedVariance(item);
                    }
                }
            }


            XmlNodeList exchangeTradedContractNearestNodeList = xmlNode.SelectNodes("exchangeTradedContractNearest");

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

            foreach (XmlNode item in exchangeTradedContractNearestNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exchangeTradedContractNearestIDRef = item.Attributes["id"].Name;
                        ExchangeTradedContract ob = ExchangeTradedContract();
                        IDManager.SetID(exchangeTradedContractNearestIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exchangeTradedContractNearestIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exchangeTradedContractNearest = new ExchangeTradedContract(item);
                    }
                }
            }


            XmlNodeList vegaNotionalAmountNodeList = xmlNode.SelectNodes("vegaNotionalAmount");

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

            foreach (XmlNode item in vegaNotionalAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        vegaNotionalAmountIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(vegaNotionalAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        vegaNotionalAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        vegaNotionalAmount = new XsdTypeDecimal(item);
                    }
                }
            }
        }
Exemple #31
0
        public Commodity(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList commodityBaseNodeList = xmlNode.SelectNodes("commodityBase");

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

            foreach (XmlNode item in commodityBaseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        commodityBaseIDRef = item.Attributes["id"].Name;
                        CommodityBase ob = CommodityBase();
                        IDManager.SetID(commodityBaseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        commodityBaseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        commodityBase = new CommodityBase(item);
                    }
                }
            }


            XmlNodeList commodityDetailsNodeList = xmlNode.SelectNodes("commodityDetails");

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

            foreach (XmlNode item in commodityDetailsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        commodityDetailsIDRef = item.Attributes["id"].Name;
                        CommodityDetails ob = CommodityDetails();
                        IDManager.SetID(commodityDetailsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        commodityDetailsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        commodityDetails = new CommodityDetails(item);
                    }
                }
            }


            XmlNodeList unitNodeList = xmlNode.SelectNodes("unit");

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

            foreach (XmlNode item in unitNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        unitIDRef = item.Attributes["id"].Name;
                        QuantityUnit ob = QuantityUnit();
                        IDManager.SetID(unitIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        unitIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        unit = new QuantityUnit(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 exchangeIdNodeList = xmlNode.SelectNodes("exchangeId");

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

            foreach (XmlNode item in exchangeIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exchangeIdIDRef = item.Attributes["id"].Name;
                        ExchangeId ob = ExchangeId();
                        IDManager.SetID(exchangeIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exchangeIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exchangeId = new ExchangeId(item);
                    }
                }
            }


            XmlNodeList publicationNodeList = xmlNode.SelectNodes("publication");

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

            foreach (XmlNode item in publicationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        publicationIDRef = item.Attributes["id"].Name;
                        CommodityInformationSource ob = CommodityInformationSource();
                        IDManager.SetID(publicationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        publicationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        publication = new CommodityInformationSource(item);
                    }
                }
            }


            XmlNodeList specifiedPriceNodeList = xmlNode.SelectNodes("specifiedPrice");

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

            foreach (XmlNode item in specifiedPriceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        specifiedPriceIDRef = item.Attributes["id"].Name;
                        SpecifiedPriceEnum ob = SpecifiedPriceEnum();
                        IDManager.SetID(specifiedPriceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        specifiedPriceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        specifiedPrice = new SpecifiedPriceEnum(item);
                    }
                }
            }


            XmlNodeList deliveryDatesNodeList = xmlNode.SelectNodes("deliveryDates");

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

            foreach (XmlNode item in deliveryDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryDatesIDRef = item.Attributes["id"].Name;
                        DeliveryDatesEnum ob = DeliveryDatesEnum();
                        IDManager.SetID(deliveryDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryDates = new DeliveryDatesEnum(item);
                    }
                }
            }


            XmlNodeList deliveryDateNodeList = xmlNode.SelectNodes("deliveryDate");

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

            foreach (XmlNode item in deliveryDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryDateIDRef = item.Attributes["id"].Name;
                        AdjustableDate ob = AdjustableDate();
                        IDManager.SetID(deliveryDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryDate = new AdjustableDate(item);
                    }
                }
            }


            XmlNodeList deliveryDateYearMonthNodeList = xmlNode.SelectNodes("deliveryDateYearMonth");

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

            foreach (XmlNode item in deliveryDateYearMonthNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryDateYearMonthIDRef = item.Attributes["id"].Name;
                        XsdTypeGYearMonth ob = XsdTypeGYearMonth();
                        IDManager.SetID(deliveryDateYearMonthIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryDateYearMonthIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryDateYearMonth = new XsdTypeGYearMonth(item);
                    }
                }
            }


            XmlNodeList deliveryDateRollConventionNodeList = xmlNode.SelectNodes("deliveryDateRollConvention");

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

            foreach (XmlNode item in deliveryDateRollConventionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryDateRollConventionIDRef = item.Attributes["id"].Name;
                        Offset ob = Offset();
                        IDManager.SetID(deliveryDateRollConventionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryDateRollConventionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryDateRollConvention = new Offset(item);
                    }
                }
            }


            XmlNodeList multiplierNodeList = xmlNode.SelectNodes("multiplier");

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

            foreach (XmlNode item in multiplierNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        multiplierIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(multiplierIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        multiplierIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        multiplier = new PositiveDecimal(item);
                    }
                }
            }
        }
        public EquityOptionTransactionSupplement(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode exchangeLookAlikeNode = xmlNode.SelectSingleNode("exchangeLookAlike");

            if (exchangeLookAlikeNode != null)
            {
                if (exchangeLookAlikeNode.Attributes["href"] != null || exchangeLookAlikeNode.Attributes["id"] != null)
                {
                    if (exchangeLookAlikeNode.Attributes["id"] != null)
                    {
                        exchangeLookAlikeIDRef_ = exchangeLookAlikeNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(exchangeLookAlikeNode);
                        IDManager.SetID(exchangeLookAlikeIDRef_, ob);
                    }
                    else if (exchangeLookAlikeNode.Attributes["href"] != null)
                    {
                        exchangeLookAlikeIDRef_ = exchangeLookAlikeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangeLookAlike_ = new XsdTypeBoolean(exchangeLookAlikeNode);
                    }
                }
                else
                {
                    exchangeLookAlike_ = new XsdTypeBoolean(exchangeLookAlikeNode);
                }
            }


            XmlNode exchangeTradedContractNearestNode = xmlNode.SelectSingleNode("exchangeTradedContractNearest");

            if (exchangeTradedContractNearestNode != null)
            {
                if (exchangeTradedContractNearestNode.Attributes["href"] != null || exchangeTradedContractNearestNode.Attributes["id"] != null)
                {
                    if (exchangeTradedContractNearestNode.Attributes["id"] != null)
                    {
                        exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(exchangeTradedContractNearestNode);
                        IDManager.SetID(exchangeTradedContractNearestIDRef_, ob);
                    }
                    else if (exchangeTradedContractNearestNode.Attributes["href"] != null)
                    {
                        exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangeTradedContractNearest_ = new XsdTypeBoolean(exchangeTradedContractNearestNode);
                    }
                }
                else
                {
                    exchangeTradedContractNearest_ = new XsdTypeBoolean(exchangeTradedContractNearestNode);
                }
            }


            XmlNode multipleExchangeIndexAnnexFallbackNode = xmlNode.SelectSingleNode("multipleExchangeIndexAnnexFallback");

            if (multipleExchangeIndexAnnexFallbackNode != null)
            {
                if (multipleExchangeIndexAnnexFallbackNode.Attributes["href"] != null || multipleExchangeIndexAnnexFallbackNode.Attributes["id"] != null)
                {
                    if (multipleExchangeIndexAnnexFallbackNode.Attributes["id"] != null)
                    {
                        multipleExchangeIndexAnnexFallbackIDRef_ = multipleExchangeIndexAnnexFallbackNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(multipleExchangeIndexAnnexFallbackNode);
                        IDManager.SetID(multipleExchangeIndexAnnexFallbackIDRef_, ob);
                    }
                    else if (multipleExchangeIndexAnnexFallbackNode.Attributes["href"] != null)
                    {
                        multipleExchangeIndexAnnexFallbackIDRef_ = multipleExchangeIndexAnnexFallbackNode.Attributes["href"].Value;
                    }
                    else
                    {
                        multipleExchangeIndexAnnexFallback_ = new XsdTypeBoolean(multipleExchangeIndexAnnexFallbackNode);
                    }
                }
                else
                {
                    multipleExchangeIndexAnnexFallback_ = new XsdTypeBoolean(multipleExchangeIndexAnnexFallbackNode);
                }
            }


            XmlNode componentSecurityIndexAnnexFallbackNode = xmlNode.SelectSingleNode("componentSecurityIndexAnnexFallback");

            if (componentSecurityIndexAnnexFallbackNode != null)
            {
                if (componentSecurityIndexAnnexFallbackNode.Attributes["href"] != null || componentSecurityIndexAnnexFallbackNode.Attributes["id"] != null)
                {
                    if (componentSecurityIndexAnnexFallbackNode.Attributes["id"] != null)
                    {
                        componentSecurityIndexAnnexFallbackIDRef_ = componentSecurityIndexAnnexFallbackNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(componentSecurityIndexAnnexFallbackNode);
                        IDManager.SetID(componentSecurityIndexAnnexFallbackIDRef_, ob);
                    }
                    else if (componentSecurityIndexAnnexFallbackNode.Attributes["href"] != null)
                    {
                        componentSecurityIndexAnnexFallbackIDRef_ = componentSecurityIndexAnnexFallbackNode.Attributes["href"].Value;
                    }
                    else
                    {
                        componentSecurityIndexAnnexFallback_ = new XsdTypeBoolean(componentSecurityIndexAnnexFallbackNode);
                    }
                }
                else
                {
                    componentSecurityIndexAnnexFallback_ = new XsdTypeBoolean(componentSecurityIndexAnnexFallbackNode);
                }
            }


            XmlNode methodOfAdjustmentNode = xmlNode.SelectSingleNode("methodOfAdjustment");

            if (methodOfAdjustmentNode != null)
            {
                if (methodOfAdjustmentNode.Attributes["href"] != null || methodOfAdjustmentNode.Attributes["id"] != null)
                {
                    if (methodOfAdjustmentNode.Attributes["id"] != null)
                    {
                        methodOfAdjustmentIDRef_ = methodOfAdjustmentNode.Attributes["id"].Value;
                        MethodOfAdjustmentEnum ob = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
                        IDManager.SetID(methodOfAdjustmentIDRef_, ob);
                    }
                    else if (methodOfAdjustmentNode.Attributes["href"] != null)
                    {
                        methodOfAdjustmentIDRef_ = methodOfAdjustmentNode.Attributes["href"].Value;
                    }
                    else
                    {
                        methodOfAdjustment_ = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
                    }
                }
                else
                {
                    methodOfAdjustment_ = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
                }
            }


            XmlNode localJurisdictionNode = xmlNode.SelectSingleNode("localJurisdiction");

            if (localJurisdictionNode != null)
            {
                if (localJurisdictionNode.Attributes["href"] != null || localJurisdictionNode.Attributes["id"] != null)
                {
                    if (localJurisdictionNode.Attributes["id"] != null)
                    {
                        localJurisdictionIDRef_ = localJurisdictionNode.Attributes["id"].Value;
                        CountryCode ob = new CountryCode(localJurisdictionNode);
                        IDManager.SetID(localJurisdictionIDRef_, ob);
                    }
                    else if (localJurisdictionNode.Attributes["href"] != null)
                    {
                        localJurisdictionIDRef_ = localJurisdictionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        localJurisdiction_ = new CountryCode(localJurisdictionNode);
                    }
                }
                else
                {
                    localJurisdiction_ = new CountryCode(localJurisdictionNode);
                }
            }


            XmlNode optionEntitlementNode = xmlNode.SelectSingleNode("optionEntitlement");

            if (optionEntitlementNode != null)
            {
                if (optionEntitlementNode.Attributes["href"] != null || optionEntitlementNode.Attributes["id"] != null)
                {
                    if (optionEntitlementNode.Attributes["id"] != null)
                    {
                        optionEntitlementIDRef_ = optionEntitlementNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(optionEntitlementNode);
                        IDManager.SetID(optionEntitlementIDRef_, ob);
                    }
                    else if (optionEntitlementNode.Attributes["href"] != null)
                    {
                        optionEntitlementIDRef_ = optionEntitlementNode.Attributes["href"].Value;
                    }
                    else
                    {
                        optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
                    }
                }
                else
                {
                    optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
                }
            }


            XmlNode multiplierNode = xmlNode.SelectSingleNode("multiplier");

            if (multiplierNode != null)
            {
                if (multiplierNode.Attributes["href"] != null || multiplierNode.Attributes["id"] != null)
                {
                    if (multiplierNode.Attributes["id"] != null)
                    {
                        multiplierIDRef_ = multiplierNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(multiplierNode);
                        IDManager.SetID(multiplierIDRef_, ob);
                    }
                    else if (multiplierNode.Attributes["href"] != null)
                    {
                        multiplierIDRef_ = multiplierNode.Attributes["href"].Value;
                    }
                    else
                    {
                        multiplier_ = new PositiveDecimal(multiplierNode);
                    }
                }
                else
                {
                    multiplier_ = new PositiveDecimal(multiplierNode);
                }
            }


            XmlNode extraordinaryEventsNode = xmlNode.SelectSingleNode("extraordinaryEvents");

            if (extraordinaryEventsNode != null)
            {
                if (extraordinaryEventsNode.Attributes["href"] != null || extraordinaryEventsNode.Attributes["id"] != null)
                {
                    if (extraordinaryEventsNode.Attributes["id"] != null)
                    {
                        extraordinaryEventsIDRef_ = extraordinaryEventsNode.Attributes["id"].Value;
                        ExtraordinaryEvents ob = new ExtraordinaryEvents(extraordinaryEventsNode);
                        IDManager.SetID(extraordinaryEventsIDRef_, ob);
                    }
                    else if (extraordinaryEventsNode.Attributes["href"] != null)
                    {
                        extraordinaryEventsIDRef_ = extraordinaryEventsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        extraordinaryEvents_ = new ExtraordinaryEvents(extraordinaryEventsNode);
                    }
                }
                else
                {
                    extraordinaryEvents_ = new ExtraordinaryEvents(extraordinaryEventsNode);
                }
            }
        }
 public DividendSwapOptionTransactionSupplement(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode equityPremiumNode = xmlNode.SelectSingleNode("equityPremium");
     
     if (equityPremiumNode != null)
     {
         if (equityPremiumNode.Attributes["href"] != null || equityPremiumNode.Attributes["id"] != null) 
         {
             if (equityPremiumNode.Attributes["id"] != null) 
             {
                 equityPremiumIDRef_ = equityPremiumNode.Attributes["id"].Value;
                 EquityPremium ob = new EquityPremium(equityPremiumNode);
                 IDManager.SetID(equityPremiumIDRef_, ob);
             }
             else if (equityPremiumNode.Attributes["href"] != null)
             {
                 equityPremiumIDRef_ = equityPremiumNode.Attributes["href"].Value;
             }
             else
             {
                 equityPremium_ = new EquityPremium(equityPremiumNode);
             }
         }
         else
         {
             equityPremium_ = new EquityPremium(equityPremiumNode);
         }
     }
     
 
     XmlNode equityExerciseNode = xmlNode.SelectSingleNode("equityExercise");
     
     if (equityExerciseNode != null)
     {
         if (equityExerciseNode.Attributes["href"] != null || equityExerciseNode.Attributes["id"] != null) 
         {
             if (equityExerciseNode.Attributes["id"] != null) 
             {
                 equityExerciseIDRef_ = equityExerciseNode.Attributes["id"].Value;
                 EquityExerciseValuationSettlement ob = new EquityExerciseValuationSettlement(equityExerciseNode);
                 IDManager.SetID(equityExerciseIDRef_, ob);
             }
             else if (equityExerciseNode.Attributes["href"] != null)
             {
                 equityExerciseIDRef_ = equityExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 equityExercise_ = new EquityExerciseValuationSettlement(equityExerciseNode);
             }
         }
         else
         {
             equityExercise_ = new EquityExerciseValuationSettlement(equityExerciseNode);
         }
     }
     
 
     XmlNode exchangeLookAlikeNode = xmlNode.SelectSingleNode("exchangeLookAlike");
     
     if (exchangeLookAlikeNode != null)
     {
         if (exchangeLookAlikeNode.Attributes["href"] != null || exchangeLookAlikeNode.Attributes["id"] != null) 
         {
             if (exchangeLookAlikeNode.Attributes["id"] != null) 
             {
                 exchangeLookAlikeIDRef_ = exchangeLookAlikeNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(exchangeLookAlikeNode);
                 IDManager.SetID(exchangeLookAlikeIDRef_, ob);
             }
             else if (exchangeLookAlikeNode.Attributes["href"] != null)
             {
                 exchangeLookAlikeIDRef_ = exchangeLookAlikeNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeLookAlike_ = new XsdTypeBoolean(exchangeLookAlikeNode);
             }
         }
         else
         {
             exchangeLookAlike_ = new XsdTypeBoolean(exchangeLookAlikeNode);
         }
     }
     
 
     XmlNode methodOfAdjustmentNode = xmlNode.SelectSingleNode("methodOfAdjustment");
     
     if (methodOfAdjustmentNode != null)
     {
         if (methodOfAdjustmentNode.Attributes["href"] != null || methodOfAdjustmentNode.Attributes["id"] != null) 
         {
             if (methodOfAdjustmentNode.Attributes["id"] != null) 
             {
                 methodOfAdjustmentIDRef_ = methodOfAdjustmentNode.Attributes["id"].Value;
                 MethodOfAdjustmentEnum ob = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
                 IDManager.SetID(methodOfAdjustmentIDRef_, ob);
             }
             else if (methodOfAdjustmentNode.Attributes["href"] != null)
             {
                 methodOfAdjustmentIDRef_ = methodOfAdjustmentNode.Attributes["href"].Value;
             }
             else
             {
                 methodOfAdjustment_ = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
             }
         }
         else
         {
             methodOfAdjustment_ = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
         }
     }
     
 
     XmlNode optionEntitlementNode = xmlNode.SelectSingleNode("optionEntitlement");
     
     if (optionEntitlementNode != null)
     {
         if (optionEntitlementNode.Attributes["href"] != null || optionEntitlementNode.Attributes["id"] != null) 
         {
             if (optionEntitlementNode.Attributes["id"] != null) 
             {
                 optionEntitlementIDRef_ = optionEntitlementNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(optionEntitlementNode);
                 IDManager.SetID(optionEntitlementIDRef_, ob);
             }
             else if (optionEntitlementNode.Attributes["href"] != null)
             {
                 optionEntitlementIDRef_ = optionEntitlementNode.Attributes["href"].Value;
             }
             else
             {
                 optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
             }
         }
         else
         {
             optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
         }
     }
     
 
     XmlNode multiplierNode = xmlNode.SelectSingleNode("multiplier");
     
     if (multiplierNode != null)
     {
         if (multiplierNode.Attributes["href"] != null || multiplierNode.Attributes["id"] != null) 
         {
             if (multiplierNode.Attributes["id"] != null) 
             {
                 multiplierIDRef_ = multiplierNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(multiplierNode);
                 IDManager.SetID(multiplierIDRef_, ob);
             }
             else if (multiplierNode.Attributes["href"] != null)
             {
                 multiplierIDRef_ = multiplierNode.Attributes["href"].Value;
             }
             else
             {
                 multiplier_ = new PositiveDecimal(multiplierNode);
             }
         }
         else
         {
             multiplier_ = new PositiveDecimal(multiplierNode);
         }
     }
     
 
     XmlNode dividendSwapTransactionSupplementNode = xmlNode.SelectSingleNode("dividendSwapTransactionSupplement");
     
     if (dividendSwapTransactionSupplementNode != null)
     {
         if (dividendSwapTransactionSupplementNode.Attributes["href"] != null || dividendSwapTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (dividendSwapTransactionSupplementNode.Attributes["id"] != null) 
             {
                 dividendSwapTransactionSupplementIDRef_ = dividendSwapTransactionSupplementNode.Attributes["id"].Value;
                 DividendSwapTransactionSupplement ob = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
                 IDManager.SetID(dividendSwapTransactionSupplementIDRef_, ob);
             }
             else if (dividendSwapTransactionSupplementNode.Attributes["href"] != null)
             {
                 dividendSwapTransactionSupplementIDRef_ = dividendSwapTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 dividendSwapTransactionSupplement_ = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
             }
         }
         else
         {
             dividendSwapTransactionSupplement_ = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
         }
     }
     
 
 }
        public EquityMultipleExercise(XmlNode xmlNode)
        {
            XmlNode integralMultipleExerciseNode = xmlNode.SelectSingleNode("integralMultipleExercise");

            if (integralMultipleExerciseNode != null)
            {
                if (integralMultipleExerciseNode.Attributes["href"] != null || integralMultipleExerciseNode.Attributes["id"] != null)
                {
                    if (integralMultipleExerciseNode.Attributes["id"] != null)
                    {
                        integralMultipleExerciseIDRef_ = integralMultipleExerciseNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(integralMultipleExerciseNode);
                        IDManager.SetID(integralMultipleExerciseIDRef_, ob);
                    }
                    else if (integralMultipleExerciseNode.Attributes["href"] != null)
                    {
                        integralMultipleExerciseIDRef_ = integralMultipleExerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        integralMultipleExercise_ = new PositiveDecimal(integralMultipleExerciseNode);
                    }
                }
                else
                {
                    integralMultipleExercise_ = new PositiveDecimal(integralMultipleExerciseNode);
                }
            }


            XmlNode minimumNumberOfOptionsNode = xmlNode.SelectSingleNode("minimumNumberOfOptions");

            if (minimumNumberOfOptionsNode != null)
            {
                if (minimumNumberOfOptionsNode.Attributes["href"] != null || minimumNumberOfOptionsNode.Attributes["id"] != null)
                {
                    if (minimumNumberOfOptionsNode.Attributes["id"] != null)
                    {
                        minimumNumberOfOptionsIDRef_ = minimumNumberOfOptionsNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(minimumNumberOfOptionsNode);
                        IDManager.SetID(minimumNumberOfOptionsIDRef_, ob);
                    }
                    else if (minimumNumberOfOptionsNode.Attributes["href"] != null)
                    {
                        minimumNumberOfOptionsIDRef_ = minimumNumberOfOptionsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        minimumNumberOfOptions_ = new NonNegativeDecimal(minimumNumberOfOptionsNode);
                    }
                }
                else
                {
                    minimumNumberOfOptions_ = new NonNegativeDecimal(minimumNumberOfOptionsNode);
                }
            }


            XmlNode maximumNumberOfOptionsNode = xmlNode.SelectSingleNode("maximumNumberOfOptions");

            if (maximumNumberOfOptionsNode != null)
            {
                if (maximumNumberOfOptionsNode.Attributes["href"] != null || maximumNumberOfOptionsNode.Attributes["id"] != null)
                {
                    if (maximumNumberOfOptionsNode.Attributes["id"] != null)
                    {
                        maximumNumberOfOptionsIDRef_ = maximumNumberOfOptionsNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(maximumNumberOfOptionsNode);
                        IDManager.SetID(maximumNumberOfOptionsIDRef_, ob);
                    }
                    else if (maximumNumberOfOptionsNode.Attributes["href"] != null)
                    {
                        maximumNumberOfOptionsIDRef_ = maximumNumberOfOptionsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        maximumNumberOfOptions_ = new NonNegativeDecimal(maximumNumberOfOptionsNode);
                    }
                }
                else
                {
                    maximumNumberOfOptions_ = new NonNegativeDecimal(maximumNumberOfOptionsNode);
                }
            }
        }
 public EquityMultipleExercise(XmlNode xmlNode)
 {
     XmlNode integralMultipleExerciseNode = xmlNode.SelectSingleNode("integralMultipleExercise");
     
     if (integralMultipleExerciseNode != null)
     {
         if (integralMultipleExerciseNode.Attributes["href"] != null || integralMultipleExerciseNode.Attributes["id"] != null) 
         {
             if (integralMultipleExerciseNode.Attributes["id"] != null) 
             {
                 integralMultipleExerciseIDRef_ = integralMultipleExerciseNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(integralMultipleExerciseNode);
                 IDManager.SetID(integralMultipleExerciseIDRef_, ob);
             }
             else if (integralMultipleExerciseNode.Attributes["href"] != null)
             {
                 integralMultipleExerciseIDRef_ = integralMultipleExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 integralMultipleExercise_ = new PositiveDecimal(integralMultipleExerciseNode);
             }
         }
         else
         {
             integralMultipleExercise_ = new PositiveDecimal(integralMultipleExerciseNode);
         }
     }
     
 
     XmlNode minimumNumberOfOptionsNode = xmlNode.SelectSingleNode("minimumNumberOfOptions");
     
     if (minimumNumberOfOptionsNode != null)
     {
         if (minimumNumberOfOptionsNode.Attributes["href"] != null || minimumNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (minimumNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 minimumNumberOfOptionsIDRef_ = minimumNumberOfOptionsNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(minimumNumberOfOptionsNode);
                 IDManager.SetID(minimumNumberOfOptionsIDRef_, ob);
             }
             else if (minimumNumberOfOptionsNode.Attributes["href"] != null)
             {
                 minimumNumberOfOptionsIDRef_ = minimumNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 minimumNumberOfOptions_ = new NonNegativeDecimal(minimumNumberOfOptionsNode);
             }
         }
         else
         {
             minimumNumberOfOptions_ = new NonNegativeDecimal(minimumNumberOfOptionsNode);
         }
     }
     
 
     XmlNode maximumNumberOfOptionsNode = xmlNode.SelectSingleNode("maximumNumberOfOptions");
     
     if (maximumNumberOfOptionsNode != null)
     {
         if (maximumNumberOfOptionsNode.Attributes["href"] != null || maximumNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (maximumNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 maximumNumberOfOptionsIDRef_ = maximumNumberOfOptionsNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(maximumNumberOfOptionsNode);
                 IDManager.SetID(maximumNumberOfOptionsIDRef_, ob);
             }
             else if (maximumNumberOfOptionsNode.Attributes["href"] != null)
             {
                 maximumNumberOfOptionsIDRef_ = maximumNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 maximumNumberOfOptions_ = new NonNegativeDecimal(maximumNumberOfOptionsNode);
             }
         }
         else
         {
             maximumNumberOfOptions_ = new NonNegativeDecimal(maximumNumberOfOptionsNode);
         }
     }
     
 
 }
        public EquityOptionTransactionSupplement(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList exchangeLookAlikeNodeList = xmlNode.SelectNodes("exchangeLookAlike");

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

            foreach (XmlNode item in exchangeLookAlikeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exchangeLookAlikeIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(exchangeLookAlikeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exchangeLookAlikeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exchangeLookAlike = new XsdTypeBoolean(item);
                    }
                }
            }


            XmlNodeList exchangeTradedContractNearestNodeList = xmlNode.SelectNodes("exchangeTradedContractNearest");

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

            foreach (XmlNode item in exchangeTradedContractNearestNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exchangeTradedContractNearestIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(exchangeTradedContractNearestIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exchangeTradedContractNearestIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exchangeTradedContractNearest = new XsdTypeBoolean(item);
                    }
                }
            }


            XmlNodeList multipleExchangeIndexAnnexFallbackNodeList = xmlNode.SelectNodes("multipleExchangeIndexAnnexFallback");

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

            foreach (XmlNode item in multipleExchangeIndexAnnexFallbackNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        multipleExchangeIndexAnnexFallbackIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(multipleExchangeIndexAnnexFallbackIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        multipleExchangeIndexAnnexFallbackIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        multipleExchangeIndexAnnexFallback = new XsdTypeBoolean(item);
                    }
                }
            }


            XmlNodeList componentSecurityIndexAnnexFallbackNodeList = xmlNode.SelectNodes("componentSecurityIndexAnnexFallback");

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

            foreach (XmlNode item in componentSecurityIndexAnnexFallbackNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        componentSecurityIndexAnnexFallbackIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(componentSecurityIndexAnnexFallbackIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        componentSecurityIndexAnnexFallbackIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        componentSecurityIndexAnnexFallback = new XsdTypeBoolean(item);
                    }
                }
            }


            XmlNodeList methodOfAdjustmentNodeList = xmlNode.SelectNodes("methodOfAdjustment");

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

            foreach (XmlNode item in methodOfAdjustmentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        methodOfAdjustmentIDRef = item.Attributes["id"].Name;
                        MethodOfAdjustmentEnum ob = MethodOfAdjustmentEnum();
                        IDManager.SetID(methodOfAdjustmentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        methodOfAdjustmentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        methodOfAdjustment = new MethodOfAdjustmentEnum(item);
                    }
                }
            }


            XmlNodeList localJurisdictionNodeList = xmlNode.SelectNodes("localJurisdiction");

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

            foreach (XmlNode item in localJurisdictionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        localJurisdictionIDRef = item.Attributes["id"].Name;
                        CountryCode ob = CountryCode();
                        IDManager.SetID(localJurisdictionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        localJurisdictionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        localJurisdiction = new CountryCode(item);
                    }
                }
            }


            XmlNodeList optionEntitlementNodeList = xmlNode.SelectNodes("optionEntitlement");

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

            foreach (XmlNode item in optionEntitlementNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        optionEntitlementIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(optionEntitlementIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        optionEntitlementIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        optionEntitlement = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList multiplierNodeList = xmlNode.SelectNodes("multiplier");

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

            foreach (XmlNode item in multiplierNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        multiplierIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(multiplierIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        multiplierIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        multiplier = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList extraordinaryEventsNodeList = xmlNode.SelectNodes("extraordinaryEvents");

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

            foreach (XmlNode item in extraordinaryEventsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        extraordinaryEventsIDRef = item.Attributes["id"].Name;
                        ExtraordinaryEvents ob = ExtraordinaryEvents();
                        IDManager.SetID(extraordinaryEventsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        extraordinaryEventsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        extraordinaryEvents = new ExtraordinaryEvents(item);
                    }
                }
            }
        }
        public TermDeposit(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");

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

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


            XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");

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

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


            XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");

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

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


            XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");

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

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


            XmlNodeList startDateNodeList = xmlNode.SelectNodes("startDate");

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

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


            XmlNodeList maturityDateNodeList = xmlNode.SelectNodes("maturityDate");

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

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


            XmlNodeList tenorNameNodeList = xmlNode.SelectNodes("tenorName");

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

            foreach (XmlNode item in tenorNameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tenorNameIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(tenorNameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tenorNameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tenorName = new XsdTypeBoolean(item);
                    }
                }
            }


            XmlNodeList tenorPeriodNodeList = xmlNode.SelectNodes("tenorPeriod");

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

            foreach (XmlNode item in tenorPeriodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tenorPeriodIDRef = item.Attributes["id"].Name;
                        Period ob = Period();
                        IDManager.SetID(tenorPeriodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tenorPeriodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tenorPeriod = new Period(item);
                    }
                }
            }


            XmlNodeList principalNodeList = xmlNode.SelectNodes("principal");

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

            foreach (XmlNode item in principalNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        principalIDRef = item.Attributes["id"].Name;
                        PositiveMoney ob = PositiveMoney();
                        IDManager.SetID(principalIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        principalIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        principal = new PositiveMoney(item);
                    }
                }
            }


            XmlNodeList fixedRateNodeList = xmlNode.SelectNodes("fixedRate");

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

            foreach (XmlNode item in fixedRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixedRateIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(fixedRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixedRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixedRate = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList dayCountFractionNodeList = xmlNode.SelectNodes("dayCountFraction");

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

            foreach (XmlNode item in dayCountFractionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dayCountFractionIDRef = item.Attributes["id"].Name;
                        DayCountFraction ob = DayCountFraction();
                        IDManager.SetID(dayCountFractionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dayCountFractionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dayCountFraction = new DayCountFraction(item);
                    }
                }
            }


            XmlNodeList featuresNodeList = xmlNode.SelectNodes("features");

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

            foreach (XmlNode item in featuresNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        featuresIDRef = item.Attributes["id"].Name;
                        TermDepositFeatures ob = TermDepositFeatures();
                        IDManager.SetID(featuresIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        featuresIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        features = new TermDepositFeatures(item);
                    }
                }
            }


            XmlNodeList interestNodeList = xmlNode.SelectNodes("interest");

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

            foreach (XmlNode item in interestNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        interestIDRef = item.Attributes["id"].Name;
                        Money ob = Money();
                        IDManager.SetID(interestIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        interestIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        interest = new Money(item);
                    }
                }
            }


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

            foreach (XmlNode item in paymentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentIDRef = item.Attributes["id"].Name;
                        List <Payment> ob = new List <Payment>();
                        ob.Add(new Payment(item));
                        IDManager.SetID(paymentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payment.Add(new Payment(item));
                    }
                }
            }
        }
 public EquityOption(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode strikeNode = xmlNode.SelectSingleNode("strike");
     
     if (strikeNode != null)
     {
         if (strikeNode.Attributes["href"] != null || strikeNode.Attributes["id"] != null) 
         {
             if (strikeNode.Attributes["id"] != null) 
             {
                 strikeIDRef_ = strikeNode.Attributes["id"].Value;
                 EquityStrike ob = new EquityStrike(strikeNode);
                 IDManager.SetID(strikeIDRef_, ob);
             }
             else if (strikeNode.Attributes["href"] != null)
             {
                 strikeIDRef_ = strikeNode.Attributes["href"].Value;
             }
             else
             {
                 strike_ = new EquityStrike(strikeNode);
             }
         }
         else
         {
             strike_ = new EquityStrike(strikeNode);
         }
     }
     
 
     XmlNode spotPriceNode = xmlNode.SelectSingleNode("spotPrice");
     
     if (spotPriceNode != null)
     {
         if (spotPriceNode.Attributes["href"] != null || spotPriceNode.Attributes["id"] != null) 
         {
             if (spotPriceNode.Attributes["id"] != null) 
             {
                 spotPriceIDRef_ = spotPriceNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(spotPriceNode);
                 IDManager.SetID(spotPriceIDRef_, ob);
             }
             else if (spotPriceNode.Attributes["href"] != null)
             {
                 spotPriceIDRef_ = spotPriceNode.Attributes["href"].Value;
             }
             else
             {
                 spotPrice_ = new NonNegativeDecimal(spotPriceNode);
             }
         }
         else
         {
             spotPrice_ = new NonNegativeDecimal(spotPriceNode);
         }
     }
     
 
     XmlNode numberOfOptionsNode = xmlNode.SelectSingleNode("numberOfOptions");
     
     if (numberOfOptionsNode != null)
     {
         if (numberOfOptionsNode.Attributes["href"] != null || numberOfOptionsNode.Attributes["id"] != null) 
         {
             if (numberOfOptionsNode.Attributes["id"] != null) 
             {
                 numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(numberOfOptionsNode);
                 IDManager.SetID(numberOfOptionsIDRef_, ob);
             }
             else if (numberOfOptionsNode.Attributes["href"] != null)
             {
                 numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 numberOfOptions_ = new NonNegativeDecimal(numberOfOptionsNode);
             }
         }
         else
         {
             numberOfOptions_ = new NonNegativeDecimal(numberOfOptionsNode);
         }
     }
     
 
     XmlNode optionEntitlementNode = xmlNode.SelectSingleNode("optionEntitlement");
     
     if (optionEntitlementNode != null)
     {
         if (optionEntitlementNode.Attributes["href"] != null || optionEntitlementNode.Attributes["id"] != null) 
         {
             if (optionEntitlementNode.Attributes["id"] != null) 
             {
                 optionEntitlementIDRef_ = optionEntitlementNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(optionEntitlementNode);
                 IDManager.SetID(optionEntitlementIDRef_, ob);
             }
             else if (optionEntitlementNode.Attributes["href"] != null)
             {
                 optionEntitlementIDRef_ = optionEntitlementNode.Attributes["href"].Value;
             }
             else
             {
                 optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
             }
         }
         else
         {
             optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
         }
     }
     
 
     XmlNode equityPremiumNode = xmlNode.SelectSingleNode("equityPremium");
     
     if (equityPremiumNode != null)
     {
         if (equityPremiumNode.Attributes["href"] != null || equityPremiumNode.Attributes["id"] != null) 
         {
             if (equityPremiumNode.Attributes["id"] != null) 
             {
                 equityPremiumIDRef_ = equityPremiumNode.Attributes["id"].Value;
                 EquityPremium ob = new EquityPremium(equityPremiumNode);
                 IDManager.SetID(equityPremiumIDRef_, ob);
             }
             else if (equityPremiumNode.Attributes["href"] != null)
             {
                 equityPremiumIDRef_ = equityPremiumNode.Attributes["href"].Value;
             }
             else
             {
                 equityPremium_ = new EquityPremium(equityPremiumNode);
             }
         }
         else
         {
             equityPremium_ = new EquityPremium(equityPremiumNode);
         }
     }
     
 
 }
Exemple #39
0
        public DividendPeriodPayment(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList fixedStrikeNodeList = xmlNode.SelectNodes("fixedStrike");

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

            foreach (XmlNode item in fixedStrikeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixedStrikeIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(fixedStrikeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixedStrikeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixedStrike = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");

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

            foreach (XmlNode item in paymentDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentDateIDRef = item.Attributes["id"].Name;
                        AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                        IDManager.SetID(paymentDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentDate = new AdjustableOrRelativeDate(item);
                    }
                }
            }


            XmlNodeList valuationDateNodeList = xmlNode.SelectNodes("valuationDate");

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

            foreach (XmlNode item in valuationDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valuationDateIDRef = item.Attributes["id"].Name;
                        AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                        IDManager.SetID(valuationDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valuationDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        valuationDate = new AdjustableOrRelativeDate(item);
                    }
                }
            }
        }
        public DividendPeriodPayment(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode fixedStrikeNode = xmlNode.SelectSingleNode("fixedStrike");

            if (fixedStrikeNode != null)
            {
                if (fixedStrikeNode.Attributes["href"] != null || fixedStrikeNode.Attributes["id"] != null)
                {
                    if (fixedStrikeNode.Attributes["id"] != null)
                    {
                        fixedStrikeIDRef_ = fixedStrikeNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(fixedStrikeNode);
                        IDManager.SetID(fixedStrikeIDRef_, ob);
                    }
                    else if (fixedStrikeNode.Attributes["href"] != null)
                    {
                        fixedStrikeIDRef_ = fixedStrikeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixedStrike_ = new PositiveDecimal(fixedStrikeNode);
                    }
                }
                else
                {
                    fixedStrike_ = new PositiveDecimal(fixedStrikeNode);
                }
            }


            XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");

            if (paymentDateNode != null)
            {
                if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null)
                {
                    if (paymentDateNode.Attributes["id"] != null)
                    {
                        paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                        AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(paymentDateNode);
                        IDManager.SetID(paymentDateIDRef_, ob);
                    }
                    else if (paymentDateNode.Attributes["href"] != null)
                    {
                        paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDate_ = new AdjustableOrRelativeDate(paymentDateNode);
                    }
                }
                else
                {
                    paymentDate_ = new AdjustableOrRelativeDate(paymentDateNode);
                }
            }


            XmlNode valuationDateNode = xmlNode.SelectSingleNode("valuationDate");

            if (valuationDateNode != null)
            {
                if (valuationDateNode.Attributes["href"] != null || valuationDateNode.Attributes["id"] != null)
                {
                    if (valuationDateNode.Attributes["id"] != null)
                    {
                        valuationDateIDRef_ = valuationDateNode.Attributes["id"].Value;
                        AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(valuationDateNode);
                        IDManager.SetID(valuationDateIDRef_, ob);
                    }
                    else if (valuationDateNode.Attributes["href"] != null)
                    {
                        valuationDateIDRef_ = valuationDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationDate_ = new AdjustableOrRelativeDate(valuationDateNode);
                    }
                }
                else
                {
                    valuationDate_ = new AdjustableOrRelativeDate(valuationDateNode);
                }
            }
        }
 public Variance(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode varianceAmountNode = xmlNode.SelectSingleNode("varianceAmount");
     
     if (varianceAmountNode != null)
     {
         if (varianceAmountNode.Attributes["href"] != null || varianceAmountNode.Attributes["id"] != null) 
         {
             if (varianceAmountNode.Attributes["id"] != null) 
             {
                 varianceAmountIDRef_ = varianceAmountNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(varianceAmountNode);
                 IDManager.SetID(varianceAmountIDRef_, ob);
             }
             else if (varianceAmountNode.Attributes["href"] != null)
             {
                 varianceAmountIDRef_ = varianceAmountNode.Attributes["href"].Value;
             }
             else
             {
                 varianceAmount_ = new NonNegativeMoney(varianceAmountNode);
             }
         }
         else
         {
             varianceAmount_ = new NonNegativeMoney(varianceAmountNode);
         }
     }
     
 
     XmlNode volatilityStrikePriceNode = xmlNode.SelectSingleNode("volatilityStrikePrice");
     
     if (volatilityStrikePriceNode != null)
     {
         if (volatilityStrikePriceNode.Attributes["href"] != null || volatilityStrikePriceNode.Attributes["id"] != null) 
         {
             if (volatilityStrikePriceNode.Attributes["id"] != null) 
             {
                 volatilityStrikePriceIDRef_ = volatilityStrikePriceNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(volatilityStrikePriceNode);
                 IDManager.SetID(volatilityStrikePriceIDRef_, ob);
             }
             else if (volatilityStrikePriceNode.Attributes["href"] != null)
             {
                 volatilityStrikePriceIDRef_ = volatilityStrikePriceNode.Attributes["href"].Value;
             }
             else
             {
                 volatilityStrikePrice_ = new NonNegativeDecimal(volatilityStrikePriceNode);
             }
         }
         else
         {
             volatilityStrikePrice_ = new NonNegativeDecimal(volatilityStrikePriceNode);
         }
     }
     
 
     XmlNode varianceStrikePriceNode = xmlNode.SelectSingleNode("varianceStrikePrice");
     
     if (varianceStrikePriceNode != null)
     {
         if (varianceStrikePriceNode.Attributes["href"] != null || varianceStrikePriceNode.Attributes["id"] != null) 
         {
             if (varianceStrikePriceNode.Attributes["id"] != null) 
             {
                 varianceStrikePriceIDRef_ = varianceStrikePriceNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(varianceStrikePriceNode);
                 IDManager.SetID(varianceStrikePriceIDRef_, ob);
             }
             else if (varianceStrikePriceNode.Attributes["href"] != null)
             {
                 varianceStrikePriceIDRef_ = varianceStrikePriceNode.Attributes["href"].Value;
             }
             else
             {
                 varianceStrikePrice_ = new NonNegativeDecimal(varianceStrikePriceNode);
             }
         }
         else
         {
             varianceStrikePrice_ = new NonNegativeDecimal(varianceStrikePriceNode);
         }
     }
     
 
     XmlNode varianceCapNode = xmlNode.SelectSingleNode("varianceCap");
     
     if (varianceCapNode != null)
     {
         if (varianceCapNode.Attributes["href"] != null || varianceCapNode.Attributes["id"] != null) 
         {
             if (varianceCapNode.Attributes["id"] != null) 
             {
                 varianceCapIDRef_ = varianceCapNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(varianceCapNode);
                 IDManager.SetID(varianceCapIDRef_, ob);
             }
             else if (varianceCapNode.Attributes["href"] != null)
             {
                 varianceCapIDRef_ = varianceCapNode.Attributes["href"].Value;
             }
             else
             {
                 varianceCap_ = new XsdTypeBoolean(varianceCapNode);
             }
         }
         else
         {
             varianceCap_ = new XsdTypeBoolean(varianceCapNode);
         }
     }
     
 
     XmlNode unadjustedVarianceCapNode = xmlNode.SelectSingleNode("unadjustedVarianceCap");
     
     if (unadjustedVarianceCapNode != null)
     {
         if (unadjustedVarianceCapNode.Attributes["href"] != null || unadjustedVarianceCapNode.Attributes["id"] != null) 
         {
             if (unadjustedVarianceCapNode.Attributes["id"] != null) 
             {
                 unadjustedVarianceCapIDRef_ = unadjustedVarianceCapNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(unadjustedVarianceCapNode);
                 IDManager.SetID(unadjustedVarianceCapIDRef_, ob);
             }
             else if (unadjustedVarianceCapNode.Attributes["href"] != null)
             {
                 unadjustedVarianceCapIDRef_ = unadjustedVarianceCapNode.Attributes["href"].Value;
             }
             else
             {
                 unadjustedVarianceCap_ = new PositiveDecimal(unadjustedVarianceCapNode);
             }
         }
         else
         {
             unadjustedVarianceCap_ = new PositiveDecimal(unadjustedVarianceCapNode);
         }
     }
     
 
     XmlNode boundedVarianceNode = xmlNode.SelectSingleNode("boundedVariance");
     
     if (boundedVarianceNode != null)
     {
         if (boundedVarianceNode.Attributes["href"] != null || boundedVarianceNode.Attributes["id"] != null) 
         {
             if (boundedVarianceNode.Attributes["id"] != null) 
             {
                 boundedVarianceIDRef_ = boundedVarianceNode.Attributes["id"].Value;
                 BoundedVariance ob = new BoundedVariance(boundedVarianceNode);
                 IDManager.SetID(boundedVarianceIDRef_, ob);
             }
             else if (boundedVarianceNode.Attributes["href"] != null)
             {
                 boundedVarianceIDRef_ = boundedVarianceNode.Attributes["href"].Value;
             }
             else
             {
                 boundedVariance_ = new BoundedVariance(boundedVarianceNode);
             }
         }
         else
         {
             boundedVariance_ = new BoundedVariance(boundedVarianceNode);
         }
     }
     
 
     XmlNode exchangeTradedContractNearestNode = xmlNode.SelectSingleNode("exchangeTradedContractNearest");
     
     if (exchangeTradedContractNearestNode != null)
     {
         if (exchangeTradedContractNearestNode.Attributes["href"] != null || exchangeTradedContractNearestNode.Attributes["id"] != null) 
         {
             if (exchangeTradedContractNearestNode.Attributes["id"] != null) 
             {
                 exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["id"].Value;
                 ExchangeTradedContract ob = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                 IDManager.SetID(exchangeTradedContractNearestIDRef_, ob);
             }
             else if (exchangeTradedContractNearestNode.Attributes["href"] != null)
             {
                 exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
             }
         }
         else
         {
             exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
         }
     }
     
 
     XmlNode vegaNotionalAmountNode = xmlNode.SelectSingleNode("vegaNotionalAmount");
     
     if (vegaNotionalAmountNode != null)
     {
         if (vegaNotionalAmountNode.Attributes["href"] != null || vegaNotionalAmountNode.Attributes["id"] != null) 
         {
             if (vegaNotionalAmountNode.Attributes["id"] != null) 
             {
                 vegaNotionalAmountIDRef_ = vegaNotionalAmountNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(vegaNotionalAmountNode);
                 IDManager.SetID(vegaNotionalAmountIDRef_, ob);
             }
             else if (vegaNotionalAmountNode.Attributes["href"] != null)
             {
                 vegaNotionalAmountIDRef_ = vegaNotionalAmountNode.Attributes["href"].Value;
             }
             else
             {
                 vegaNotionalAmount_ = new XsdTypeDecimal(vegaNotionalAmountNode);
             }
         }
         else
         {
             vegaNotionalAmount_ = new XsdTypeDecimal(vegaNotionalAmountNode);
         }
     }
     
 
 }
        public DividendSwapOptionTransactionSupplement(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode equityPremiumNode = xmlNode.SelectSingleNode("equityPremium");

            if (equityPremiumNode != null)
            {
                if (equityPremiumNode.Attributes["href"] != null || equityPremiumNode.Attributes["id"] != null)
                {
                    if (equityPremiumNode.Attributes["id"] != null)
                    {
                        equityPremiumIDRef_ = equityPremiumNode.Attributes["id"].Value;
                        EquityPremium ob = new EquityPremium(equityPremiumNode);
                        IDManager.SetID(equityPremiumIDRef_, ob);
                    }
                    else if (equityPremiumNode.Attributes["href"] != null)
                    {
                        equityPremiumIDRef_ = equityPremiumNode.Attributes["href"].Value;
                    }
                    else
                    {
                        equityPremium_ = new EquityPremium(equityPremiumNode);
                    }
                }
                else
                {
                    equityPremium_ = new EquityPremium(equityPremiumNode);
                }
            }


            XmlNode equityExerciseNode = xmlNode.SelectSingleNode("equityExercise");

            if (equityExerciseNode != null)
            {
                if (equityExerciseNode.Attributes["href"] != null || equityExerciseNode.Attributes["id"] != null)
                {
                    if (equityExerciseNode.Attributes["id"] != null)
                    {
                        equityExerciseIDRef_ = equityExerciseNode.Attributes["id"].Value;
                        EquityExerciseValuationSettlement ob = new EquityExerciseValuationSettlement(equityExerciseNode);
                        IDManager.SetID(equityExerciseIDRef_, ob);
                    }
                    else if (equityExerciseNode.Attributes["href"] != null)
                    {
                        equityExerciseIDRef_ = equityExerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        equityExercise_ = new EquityExerciseValuationSettlement(equityExerciseNode);
                    }
                }
                else
                {
                    equityExercise_ = new EquityExerciseValuationSettlement(equityExerciseNode);
                }
            }


            XmlNode exchangeLookAlikeNode = xmlNode.SelectSingleNode("exchangeLookAlike");

            if (exchangeLookAlikeNode != null)
            {
                if (exchangeLookAlikeNode.Attributes["href"] != null || exchangeLookAlikeNode.Attributes["id"] != null)
                {
                    if (exchangeLookAlikeNode.Attributes["id"] != null)
                    {
                        exchangeLookAlikeIDRef_ = exchangeLookAlikeNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(exchangeLookAlikeNode);
                        IDManager.SetID(exchangeLookAlikeIDRef_, ob);
                    }
                    else if (exchangeLookAlikeNode.Attributes["href"] != null)
                    {
                        exchangeLookAlikeIDRef_ = exchangeLookAlikeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangeLookAlike_ = new XsdTypeBoolean(exchangeLookAlikeNode);
                    }
                }
                else
                {
                    exchangeLookAlike_ = new XsdTypeBoolean(exchangeLookAlikeNode);
                }
            }


            XmlNode methodOfAdjustmentNode = xmlNode.SelectSingleNode("methodOfAdjustment");

            if (methodOfAdjustmentNode != null)
            {
                if (methodOfAdjustmentNode.Attributes["href"] != null || methodOfAdjustmentNode.Attributes["id"] != null)
                {
                    if (methodOfAdjustmentNode.Attributes["id"] != null)
                    {
                        methodOfAdjustmentIDRef_ = methodOfAdjustmentNode.Attributes["id"].Value;
                        MethodOfAdjustmentEnum ob = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
                        IDManager.SetID(methodOfAdjustmentIDRef_, ob);
                    }
                    else if (methodOfAdjustmentNode.Attributes["href"] != null)
                    {
                        methodOfAdjustmentIDRef_ = methodOfAdjustmentNode.Attributes["href"].Value;
                    }
                    else
                    {
                        methodOfAdjustment_ = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
                    }
                }
                else
                {
                    methodOfAdjustment_ = new MethodOfAdjustmentEnum(methodOfAdjustmentNode);
                }
            }


            XmlNode optionEntitlementNode = xmlNode.SelectSingleNode("optionEntitlement");

            if (optionEntitlementNode != null)
            {
                if (optionEntitlementNode.Attributes["href"] != null || optionEntitlementNode.Attributes["id"] != null)
                {
                    if (optionEntitlementNode.Attributes["id"] != null)
                    {
                        optionEntitlementIDRef_ = optionEntitlementNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(optionEntitlementNode);
                        IDManager.SetID(optionEntitlementIDRef_, ob);
                    }
                    else if (optionEntitlementNode.Attributes["href"] != null)
                    {
                        optionEntitlementIDRef_ = optionEntitlementNode.Attributes["href"].Value;
                    }
                    else
                    {
                        optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
                    }
                }
                else
                {
                    optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
                }
            }


            XmlNode multiplierNode = xmlNode.SelectSingleNode("multiplier");

            if (multiplierNode != null)
            {
                if (multiplierNode.Attributes["href"] != null || multiplierNode.Attributes["id"] != null)
                {
                    if (multiplierNode.Attributes["id"] != null)
                    {
                        multiplierIDRef_ = multiplierNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(multiplierNode);
                        IDManager.SetID(multiplierIDRef_, ob);
                    }
                    else if (multiplierNode.Attributes["href"] != null)
                    {
                        multiplierIDRef_ = multiplierNode.Attributes["href"].Value;
                    }
                    else
                    {
                        multiplier_ = new PositiveDecimal(multiplierNode);
                    }
                }
                else
                {
                    multiplier_ = new PositiveDecimal(multiplierNode);
                }
            }


            XmlNode dividendSwapTransactionSupplementNode = xmlNode.SelectSingleNode("dividendSwapTransactionSupplement");

            if (dividendSwapTransactionSupplementNode != null)
            {
                if (dividendSwapTransactionSupplementNode.Attributes["href"] != null || dividendSwapTransactionSupplementNode.Attributes["id"] != null)
                {
                    if (dividendSwapTransactionSupplementNode.Attributes["id"] != null)
                    {
                        dividendSwapTransactionSupplementIDRef_ = dividendSwapTransactionSupplementNode.Attributes["id"].Value;
                        DividendSwapTransactionSupplement ob = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
                        IDManager.SetID(dividendSwapTransactionSupplementIDRef_, ob);
                    }
                    else if (dividendSwapTransactionSupplementNode.Attributes["href"] != null)
                    {
                        dividendSwapTransactionSupplementIDRef_ = dividendSwapTransactionSupplementNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dividendSwapTransactionSupplement_ = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
                    }
                }
                else
                {
                    dividendSwapTransactionSupplement_ = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
                }
            }
        }
        public FxOption(XmlNode xmlNode)
            : base(xmlNode)
        {
            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;
                        AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                        IDManager.SetID(effectiveDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        effectiveDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        effectiveDate = new AdjustableOrRelativeDate(item);
                    }
                }
            }


            XmlNodeList tenorPeriodNodeList = xmlNode.SelectNodes("tenorPeriod");

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

            foreach (XmlNode item in tenorPeriodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tenorPeriodIDRef = item.Attributes["id"].Name;
                        Period ob = Period();
                        IDManager.SetID(tenorPeriodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tenorPeriodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tenorPeriod = new Period(item);
                    }
                }
            }


            XmlNodeList americanExerciseNodeList = xmlNode.SelectNodes("americanExercise");

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

            foreach (XmlNode item in americanExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        americanExerciseIDRef = item.Attributes["id"].Name;
                        FxAmericanExercise ob = FxAmericanExercise();
                        IDManager.SetID(americanExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        americanExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        americanExercise = new FxAmericanExercise(item);
                    }
                }
            }


            XmlNodeList europeanExerciseNodeList = xmlNode.SelectNodes("europeanExercise");

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

            foreach (XmlNode item in europeanExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        europeanExerciseIDRef = item.Attributes["id"].Name;
                        FxEuropeanExercise ob = FxEuropeanExercise();
                        IDManager.SetID(europeanExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        europeanExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        europeanExercise = new FxEuropeanExercise(item);
                    }
                }
            }


            XmlNodeList exerciseProcedureNodeList = xmlNode.SelectNodes("exerciseProcedure");

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

            foreach (XmlNode item in exerciseProcedureNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exerciseProcedureIDRef = item.Attributes["id"].Name;
                        ExerciseProcedure ob = ExerciseProcedure();
                        IDManager.SetID(exerciseProcedureIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exerciseProcedureIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exerciseProcedure = new ExerciseProcedure(item);
                    }
                }
            }


            XmlNodeList putCurrencyAmountNodeList = xmlNode.SelectNodes("putCurrencyAmount");

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

            foreach (XmlNode item in putCurrencyAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        putCurrencyAmountIDRef = item.Attributes["id"].Name;
                        NonNegativeMoney ob = NonNegativeMoney();
                        IDManager.SetID(putCurrencyAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        putCurrencyAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        putCurrencyAmount = new NonNegativeMoney(item);
                    }
                }
            }


            XmlNodeList callCurrencyAmountNodeList = xmlNode.SelectNodes("callCurrencyAmount");

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

            foreach (XmlNode item in callCurrencyAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        callCurrencyAmountIDRef = item.Attributes["id"].Name;
                        NonNegativeMoney ob = NonNegativeMoney();
                        IDManager.SetID(callCurrencyAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        callCurrencyAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        callCurrencyAmount = new NonNegativeMoney(item);
                    }
                }
            }


            XmlNodeList soldAsNodeList = xmlNode.SelectNodes("soldAs");

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

            foreach (XmlNode item in soldAsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        soldAsIDRef = item.Attributes["id"].Name;
                        PutCallEnum ob = PutCallEnum();
                        IDManager.SetID(soldAsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        soldAsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        soldAs = new PutCallEnum(item);
                    }
                }
            }


            XmlNodeList strikeNodeList = xmlNode.SelectNodes("strike");

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

            foreach (XmlNode item in strikeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        strikeIDRef = item.Attributes["id"].Name;
                        FxStrikePrice ob = FxStrikePrice();
                        IDManager.SetID(strikeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        strikeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        strike = new FxStrikePrice(item);
                    }
                }
            }


            XmlNodeList spotRateNodeList = xmlNode.SelectNodes("spotRate");

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

            foreach (XmlNode item in spotRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        spotRateIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(spotRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        spotRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        spotRate = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList featuresNodeList = xmlNode.SelectNodes("features");

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

            foreach (XmlNode item in featuresNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        featuresIDRef = item.Attributes["id"].Name;
                        FxOptionFeatures ob = FxOptionFeatures();
                        IDManager.SetID(featuresIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        featuresIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        features = new FxOptionFeatures(item);
                    }
                }
            }


            XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium");

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


            XmlNodeList cashSettlementNodeList = xmlNode.SelectNodes("cashSettlement");

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

            foreach (XmlNode item in cashSettlementNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashSettlementIDRef = item.Attributes["id"].Name;
                        FxCashSettlement ob = FxCashSettlement();
                        IDManager.SetID(cashSettlementIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashSettlementIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashSettlement = new FxCashSettlement(item);
                    }
                }
            }
        }
 public OptionBaseExtended(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode premiumNode = xmlNode.SelectSingleNode("premium");
     
     if (premiumNode != null)
     {
         if (premiumNode.Attributes["href"] != null || premiumNode.Attributes["id"] != null) 
         {
             if (premiumNode.Attributes["id"] != null) 
             {
                 premiumIDRef_ = premiumNode.Attributes["id"].Value;
                 Premium ob = new Premium(premiumNode);
                 IDManager.SetID(premiumIDRef_, ob);
             }
             else if (premiumNode.Attributes["href"] != null)
             {
                 premiumIDRef_ = premiumNode.Attributes["href"].Value;
             }
             else
             {
                 premium_ = new Premium(premiumNode);
             }
         }
         else
         {
             premium_ = new Premium(premiumNode);
         }
     }
     
 
     XmlNode exerciseNode = xmlNode.SelectSingleNode("exercise");
     
     if (exerciseNode != null)
     {
         if (exerciseNode.Attributes["href"] != null || exerciseNode.Attributes["id"] != null) 
         {
             if (exerciseNode.Attributes["id"] != null) 
             {
                 exerciseIDRef_ = exerciseNode.Attributes["id"].Value;
                 Exercise ob = new Exercise(exerciseNode);
                 IDManager.SetID(exerciseIDRef_, ob);
             }
             else if (exerciseNode.Attributes["href"] != null)
             {
                 exerciseIDRef_ = exerciseNode.Attributes["href"].Value;
             }
             else
             {
                 exercise_ = new Exercise(exerciseNode);
             }
         }
         else
         {
             exercise_ = new Exercise(exerciseNode);
         }
     }
     
 
     XmlNode americanExerciseNode = xmlNode.SelectSingleNode("americanExercise");
     
     if (americanExerciseNode != null)
     {
         if (americanExerciseNode.Attributes["href"] != null || americanExerciseNode.Attributes["id"] != null) 
         {
             if (americanExerciseNode.Attributes["id"] != null) 
             {
                 americanExerciseIDRef_ = americanExerciseNode.Attributes["id"].Value;
                 AmericanExercise ob = new AmericanExercise(americanExerciseNode);
                 IDManager.SetID(americanExerciseIDRef_, ob);
             }
             else if (americanExerciseNode.Attributes["href"] != null)
             {
                 americanExerciseIDRef_ = americanExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 americanExercise_ = new AmericanExercise(americanExerciseNode);
             }
         }
         else
         {
             americanExercise_ = new AmericanExercise(americanExerciseNode);
         }
     }
     
 
     XmlNode bermudaExerciseNode = xmlNode.SelectSingleNode("bermudaExercise");
     
     if (bermudaExerciseNode != null)
     {
         if (bermudaExerciseNode.Attributes["href"] != null || bermudaExerciseNode.Attributes["id"] != null) 
         {
             if (bermudaExerciseNode.Attributes["id"] != null) 
             {
                 bermudaExerciseIDRef_ = bermudaExerciseNode.Attributes["id"].Value;
                 BermudaExercise ob = new BermudaExercise(bermudaExerciseNode);
                 IDManager.SetID(bermudaExerciseIDRef_, ob);
             }
             else if (bermudaExerciseNode.Attributes["href"] != null)
             {
                 bermudaExerciseIDRef_ = bermudaExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 bermudaExercise_ = new BermudaExercise(bermudaExerciseNode);
             }
         }
         else
         {
             bermudaExercise_ = new BermudaExercise(bermudaExerciseNode);
         }
     }
     
 
     XmlNode europeanExerciseNode = xmlNode.SelectSingleNode("europeanExercise");
     
     if (europeanExerciseNode != null)
     {
         if (europeanExerciseNode.Attributes["href"] != null || europeanExerciseNode.Attributes["id"] != null) 
         {
             if (europeanExerciseNode.Attributes["id"] != null) 
             {
                 europeanExerciseIDRef_ = europeanExerciseNode.Attributes["id"].Value;
                 EuropeanExercise ob = new EuropeanExercise(europeanExerciseNode);
                 IDManager.SetID(europeanExerciseIDRef_, ob);
             }
             else if (europeanExerciseNode.Attributes["href"] != null)
             {
                 europeanExerciseIDRef_ = europeanExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 europeanExercise_ = new EuropeanExercise(europeanExerciseNode);
             }
         }
         else
         {
             europeanExercise_ = new EuropeanExercise(europeanExerciseNode);
         }
     }
     
 
     XmlNode exerciseProcedureNode = xmlNode.SelectSingleNode("exerciseProcedure");
     
     if (exerciseProcedureNode != null)
     {
         if (exerciseProcedureNode.Attributes["href"] != null || exerciseProcedureNode.Attributes["id"] != null) 
         {
             if (exerciseProcedureNode.Attributes["id"] != null) 
             {
                 exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["id"].Value;
                 ExerciseProcedure ob = new ExerciseProcedure(exerciseProcedureNode);
                 IDManager.SetID(exerciseProcedureIDRef_, ob);
             }
             else if (exerciseProcedureNode.Attributes["href"] != null)
             {
                 exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["href"].Value;
             }
             else
             {
                 exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode);
             }
         }
         else
         {
             exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode);
         }
     }
     
 
     XmlNode featureNode = xmlNode.SelectSingleNode("feature");
     
     if (featureNode != null)
     {
         if (featureNode.Attributes["href"] != null || featureNode.Attributes["id"] != null) 
         {
             if (featureNode.Attributes["id"] != null) 
             {
                 featureIDRef_ = featureNode.Attributes["id"].Value;
                 OptionFeature ob = new OptionFeature(featureNode);
                 IDManager.SetID(featureIDRef_, ob);
             }
             else if (featureNode.Attributes["href"] != null)
             {
                 featureIDRef_ = featureNode.Attributes["href"].Value;
             }
             else
             {
                 feature_ = new OptionFeature(featureNode);
             }
         }
         else
         {
             feature_ = new OptionFeature(featureNode);
         }
     }
     
 
     XmlNode notionalReferenceNode = xmlNode.SelectSingleNode("notionalReference");
     
     if (notionalReferenceNode != null)
     {
         if (notionalReferenceNode.Attributes["href"] != null || notionalReferenceNode.Attributes["id"] != null) 
         {
             if (notionalReferenceNode.Attributes["id"] != null) 
             {
                 notionalReferenceIDRef_ = notionalReferenceNode.Attributes["id"].Value;
                 NotionalAmountReference ob = new NotionalAmountReference(notionalReferenceNode);
                 IDManager.SetID(notionalReferenceIDRef_, ob);
             }
             else if (notionalReferenceNode.Attributes["href"] != null)
             {
                 notionalReferenceIDRef_ = notionalReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 notionalReference_ = new NotionalAmountReference(notionalReferenceNode);
             }
         }
         else
         {
             notionalReference_ = new NotionalAmountReference(notionalReferenceNode);
         }
     }
     
 
     XmlNode notionalAmountNode = xmlNode.SelectSingleNode("notionalAmount");
     
     if (notionalAmountNode != null)
     {
         if (notionalAmountNode.Attributes["href"] != null || notionalAmountNode.Attributes["id"] != null) 
         {
             if (notionalAmountNode.Attributes["id"] != null) 
             {
                 notionalAmountIDRef_ = notionalAmountNode.Attributes["id"].Value;
                 Money ob = new Money(notionalAmountNode);
                 IDManager.SetID(notionalAmountIDRef_, ob);
             }
             else if (notionalAmountNode.Attributes["href"] != null)
             {
                 notionalAmountIDRef_ = notionalAmountNode.Attributes["href"].Value;
             }
             else
             {
                 notionalAmount_ = new Money(notionalAmountNode);
             }
         }
         else
         {
             notionalAmount_ = new Money(notionalAmountNode);
         }
     }
     
 
     XmlNode optionEntitlementNode = xmlNode.SelectSingleNode("optionEntitlement");
     
     if (optionEntitlementNode != null)
     {
         if (optionEntitlementNode.Attributes["href"] != null || optionEntitlementNode.Attributes["id"] != null) 
         {
             if (optionEntitlementNode.Attributes["id"] != null) 
             {
                 optionEntitlementIDRef_ = optionEntitlementNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(optionEntitlementNode);
                 IDManager.SetID(optionEntitlementIDRef_, ob);
             }
             else if (optionEntitlementNode.Attributes["href"] != null)
             {
                 optionEntitlementIDRef_ = optionEntitlementNode.Attributes["href"].Value;
             }
             else
             {
                 optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
             }
         }
         else
         {
             optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
         }
     }
     
 
     XmlNode entitlementCurrencyNode = xmlNode.SelectSingleNode("entitlementCurrency");
     
     if (entitlementCurrencyNode != null)
     {
         if (entitlementCurrencyNode.Attributes["href"] != null || entitlementCurrencyNode.Attributes["id"] != null) 
         {
             if (entitlementCurrencyNode.Attributes["id"] != null) 
             {
                 entitlementCurrencyIDRef_ = entitlementCurrencyNode.Attributes["id"].Value;
                 Currency ob = new Currency(entitlementCurrencyNode);
                 IDManager.SetID(entitlementCurrencyIDRef_, ob);
             }
             else if (entitlementCurrencyNode.Attributes["href"] != null)
             {
                 entitlementCurrencyIDRef_ = entitlementCurrencyNode.Attributes["href"].Value;
             }
             else
             {
                 entitlementCurrency_ = new Currency(entitlementCurrencyNode);
             }
         }
         else
         {
             entitlementCurrency_ = new Currency(entitlementCurrencyNode);
         }
     }
     
 
     XmlNode numberOfOptionsNode = xmlNode.SelectSingleNode("numberOfOptions");
     
     if (numberOfOptionsNode != null)
     {
         if (numberOfOptionsNode.Attributes["href"] != null || numberOfOptionsNode.Attributes["id"] != null) 
         {
             if (numberOfOptionsNode.Attributes["id"] != null) 
             {
                 numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(numberOfOptionsNode);
                 IDManager.SetID(numberOfOptionsIDRef_, ob);
             }
             else if (numberOfOptionsNode.Attributes["href"] != null)
             {
                 numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 numberOfOptions_ = new PositiveDecimal(numberOfOptionsNode);
             }
         }
         else
         {
             numberOfOptions_ = new PositiveDecimal(numberOfOptionsNode);
         }
     }
     
 
     XmlNode settlementTypeNode = xmlNode.SelectSingleNode("settlementType");
     
     if (settlementTypeNode != null)
     {
         if (settlementTypeNode.Attributes["href"] != null || settlementTypeNode.Attributes["id"] != null) 
         {
             if (settlementTypeNode.Attributes["id"] != null) 
             {
                 settlementTypeIDRef_ = settlementTypeNode.Attributes["id"].Value;
                 SettlementTypeEnum ob = new SettlementTypeEnum(settlementTypeNode);
                 IDManager.SetID(settlementTypeIDRef_, ob);
             }
             else if (settlementTypeNode.Attributes["href"] != null)
             {
                 settlementTypeIDRef_ = settlementTypeNode.Attributes["href"].Value;
             }
             else
             {
                 settlementType_ = new SettlementTypeEnum(settlementTypeNode);
             }
         }
         else
         {
             settlementType_ = new SettlementTypeEnum(settlementTypeNode);
         }
     }
     
 
     XmlNode settlementDateNode = xmlNode.SelectSingleNode("settlementDate");
     
     if (settlementDateNode != null)
     {
         if (settlementDateNode.Attributes["href"] != null || settlementDateNode.Attributes["id"] != null) 
         {
             if (settlementDateNode.Attributes["id"] != null) 
             {
                 settlementDateIDRef_ = settlementDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(settlementDateNode);
                 IDManager.SetID(settlementDateIDRef_, ob);
             }
             else if (settlementDateNode.Attributes["href"] != null)
             {
                 settlementDateIDRef_ = settlementDateNode.Attributes["href"].Value;
             }
             else
             {
                 settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode);
             }
         }
         else
         {
             settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode);
         }
     }
     
 
     XmlNode settlementAmountNode = xmlNode.SelectSingleNode("settlementAmount");
     
     if (settlementAmountNode != null)
     {
         if (settlementAmountNode.Attributes["href"] != null || settlementAmountNode.Attributes["id"] != null) 
         {
             if (settlementAmountNode.Attributes["id"] != null) 
             {
                 settlementAmountIDRef_ = settlementAmountNode.Attributes["id"].Value;
                 Money ob = new Money(settlementAmountNode);
                 IDManager.SetID(settlementAmountIDRef_, ob);
             }
             else if (settlementAmountNode.Attributes["href"] != null)
             {
                 settlementAmountIDRef_ = settlementAmountNode.Attributes["href"].Value;
             }
             else
             {
                 settlementAmount_ = new Money(settlementAmountNode);
             }
         }
         else
         {
             settlementAmount_ = new Money(settlementAmountNode);
         }
     }
     
 
     XmlNode settlementCurrencyNode = xmlNode.SelectSingleNode("settlementCurrency");
     
     if (settlementCurrencyNode != null)
     {
         if (settlementCurrencyNode.Attributes["href"] != null || settlementCurrencyNode.Attributes["id"] != null) 
         {
             if (settlementCurrencyNode.Attributes["id"] != null) 
             {
                 settlementCurrencyIDRef_ = settlementCurrencyNode.Attributes["id"].Value;
                 Currency ob = new Currency(settlementCurrencyNode);
                 IDManager.SetID(settlementCurrencyIDRef_, ob);
             }
             else if (settlementCurrencyNode.Attributes["href"] != null)
             {
                 settlementCurrencyIDRef_ = settlementCurrencyNode.Attributes["href"].Value;
             }
             else
             {
                 settlementCurrency_ = new Currency(settlementCurrencyNode);
             }
         }
         else
         {
             settlementCurrency_ = new Currency(settlementCurrencyNode);
         }
     }
     
 
 }
Exemple #45
0
        public Variance(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode varianceAmountNode = xmlNode.SelectSingleNode("varianceAmount");

            if (varianceAmountNode != null)
            {
                if (varianceAmountNode.Attributes["href"] != null || varianceAmountNode.Attributes["id"] != null)
                {
                    if (varianceAmountNode.Attributes["id"] != null)
                    {
                        varianceAmountIDRef_ = varianceAmountNode.Attributes["id"].Value;
                        NonNegativeMoney ob = new NonNegativeMoney(varianceAmountNode);
                        IDManager.SetID(varianceAmountIDRef_, ob);
                    }
                    else if (varianceAmountNode.Attributes["href"] != null)
                    {
                        varianceAmountIDRef_ = varianceAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        varianceAmount_ = new NonNegativeMoney(varianceAmountNode);
                    }
                }
                else
                {
                    varianceAmount_ = new NonNegativeMoney(varianceAmountNode);
                }
            }


            XmlNode volatilityStrikePriceNode = xmlNode.SelectSingleNode("volatilityStrikePrice");

            if (volatilityStrikePriceNode != null)
            {
                if (volatilityStrikePriceNode.Attributes["href"] != null || volatilityStrikePriceNode.Attributes["id"] != null)
                {
                    if (volatilityStrikePriceNode.Attributes["id"] != null)
                    {
                        volatilityStrikePriceIDRef_ = volatilityStrikePriceNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(volatilityStrikePriceNode);
                        IDManager.SetID(volatilityStrikePriceIDRef_, ob);
                    }
                    else if (volatilityStrikePriceNode.Attributes["href"] != null)
                    {
                        volatilityStrikePriceIDRef_ = volatilityStrikePriceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        volatilityStrikePrice_ = new NonNegativeDecimal(volatilityStrikePriceNode);
                    }
                }
                else
                {
                    volatilityStrikePrice_ = new NonNegativeDecimal(volatilityStrikePriceNode);
                }
            }


            XmlNode varianceStrikePriceNode = xmlNode.SelectSingleNode("varianceStrikePrice");

            if (varianceStrikePriceNode != null)
            {
                if (varianceStrikePriceNode.Attributes["href"] != null || varianceStrikePriceNode.Attributes["id"] != null)
                {
                    if (varianceStrikePriceNode.Attributes["id"] != null)
                    {
                        varianceStrikePriceIDRef_ = varianceStrikePriceNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(varianceStrikePriceNode);
                        IDManager.SetID(varianceStrikePriceIDRef_, ob);
                    }
                    else if (varianceStrikePriceNode.Attributes["href"] != null)
                    {
                        varianceStrikePriceIDRef_ = varianceStrikePriceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        varianceStrikePrice_ = new NonNegativeDecimal(varianceStrikePriceNode);
                    }
                }
                else
                {
                    varianceStrikePrice_ = new NonNegativeDecimal(varianceStrikePriceNode);
                }
            }


            XmlNode varianceCapNode = xmlNode.SelectSingleNode("varianceCap");

            if (varianceCapNode != null)
            {
                if (varianceCapNode.Attributes["href"] != null || varianceCapNode.Attributes["id"] != null)
                {
                    if (varianceCapNode.Attributes["id"] != null)
                    {
                        varianceCapIDRef_ = varianceCapNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(varianceCapNode);
                        IDManager.SetID(varianceCapIDRef_, ob);
                    }
                    else if (varianceCapNode.Attributes["href"] != null)
                    {
                        varianceCapIDRef_ = varianceCapNode.Attributes["href"].Value;
                    }
                    else
                    {
                        varianceCap_ = new XsdTypeBoolean(varianceCapNode);
                    }
                }
                else
                {
                    varianceCap_ = new XsdTypeBoolean(varianceCapNode);
                }
            }


            XmlNode unadjustedVarianceCapNode = xmlNode.SelectSingleNode("unadjustedVarianceCap");

            if (unadjustedVarianceCapNode != null)
            {
                if (unadjustedVarianceCapNode.Attributes["href"] != null || unadjustedVarianceCapNode.Attributes["id"] != null)
                {
                    if (unadjustedVarianceCapNode.Attributes["id"] != null)
                    {
                        unadjustedVarianceCapIDRef_ = unadjustedVarianceCapNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(unadjustedVarianceCapNode);
                        IDManager.SetID(unadjustedVarianceCapIDRef_, ob);
                    }
                    else if (unadjustedVarianceCapNode.Attributes["href"] != null)
                    {
                        unadjustedVarianceCapIDRef_ = unadjustedVarianceCapNode.Attributes["href"].Value;
                    }
                    else
                    {
                        unadjustedVarianceCap_ = new PositiveDecimal(unadjustedVarianceCapNode);
                    }
                }
                else
                {
                    unadjustedVarianceCap_ = new PositiveDecimal(unadjustedVarianceCapNode);
                }
            }


            XmlNode boundedVarianceNode = xmlNode.SelectSingleNode("boundedVariance");

            if (boundedVarianceNode != null)
            {
                if (boundedVarianceNode.Attributes["href"] != null || boundedVarianceNode.Attributes["id"] != null)
                {
                    if (boundedVarianceNode.Attributes["id"] != null)
                    {
                        boundedVarianceIDRef_ = boundedVarianceNode.Attributes["id"].Value;
                        BoundedVariance ob = new BoundedVariance(boundedVarianceNode);
                        IDManager.SetID(boundedVarianceIDRef_, ob);
                    }
                    else if (boundedVarianceNode.Attributes["href"] != null)
                    {
                        boundedVarianceIDRef_ = boundedVarianceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        boundedVariance_ = new BoundedVariance(boundedVarianceNode);
                    }
                }
                else
                {
                    boundedVariance_ = new BoundedVariance(boundedVarianceNode);
                }
            }


            XmlNode exchangeTradedContractNearestNode = xmlNode.SelectSingleNode("exchangeTradedContractNearest");

            if (exchangeTradedContractNearestNode != null)
            {
                if (exchangeTradedContractNearestNode.Attributes["href"] != null || exchangeTradedContractNearestNode.Attributes["id"] != null)
                {
                    if (exchangeTradedContractNearestNode.Attributes["id"] != null)
                    {
                        exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["id"].Value;
                        ExchangeTradedContract ob = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                        IDManager.SetID(exchangeTradedContractNearestIDRef_, ob);
                    }
                    else if (exchangeTradedContractNearestNode.Attributes["href"] != null)
                    {
                        exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                    }
                }
                else
                {
                    exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                }
            }


            XmlNode vegaNotionalAmountNode = xmlNode.SelectSingleNode("vegaNotionalAmount");

            if (vegaNotionalAmountNode != null)
            {
                if (vegaNotionalAmountNode.Attributes["href"] != null || vegaNotionalAmountNode.Attributes["id"] != null)
                {
                    if (vegaNotionalAmountNode.Attributes["id"] != null)
                    {
                        vegaNotionalAmountIDRef_ = vegaNotionalAmountNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(vegaNotionalAmountNode);
                        IDManager.SetID(vegaNotionalAmountIDRef_, ob);
                    }
                    else if (vegaNotionalAmountNode.Attributes["href"] != null)
                    {
                        vegaNotionalAmountIDRef_ = vegaNotionalAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        vegaNotionalAmount_ = new XsdTypeDecimal(vegaNotionalAmountNode);
                    }
                }
                else
                {
                    vegaNotionalAmount_ = new XsdTypeDecimal(vegaNotionalAmountNode);
                }
            }
        }
        public EquityMultipleExercise(XmlNode xmlNode)
        {
            XmlNodeList integralMultipleExerciseNodeList = xmlNode.SelectNodes("integralMultipleExercise");

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

            foreach (XmlNode item in integralMultipleExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        integralMultipleExerciseIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(integralMultipleExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        integralMultipleExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        integralMultipleExercise = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList minimumNumberOfOptionsNodeList = xmlNode.SelectNodes("minimumNumberOfOptions");

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

            foreach (XmlNode item in minimumNumberOfOptionsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        minimumNumberOfOptionsIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(minimumNumberOfOptionsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        minimumNumberOfOptionsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        minimumNumberOfOptions = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList maximumNumberOfOptionsNodeList = xmlNode.SelectNodes("maximumNumberOfOptions");

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

            foreach (XmlNode item in maximumNumberOfOptionsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        maximumNumberOfOptionsIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(maximumNumberOfOptionsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        maximumNumberOfOptionsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        maximumNumberOfOptions = new NonNegativeDecimal(item);
                    }
                }
            }
        }
        public CrossRate(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode rateNode = xmlNode.SelectSingleNode("rate");

            if (rateNode != null)
            {
                if (rateNode.Attributes["href"] != null || rateNode.Attributes["id"] != null)
                {
                    if (rateNode.Attributes["id"] != null)
                    {
                        rateIDRef_ = rateNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(rateNode);
                        IDManager.SetID(rateIDRef_, ob);
                    }
                    else if (rateNode.Attributes["href"] != null)
                    {
                        rateIDRef_ = rateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rate_ = new PositiveDecimal(rateNode);
                    }
                }
                else
                {
                    rate_ = new PositiveDecimal(rateNode);
                }
            }


            XmlNode spotRateNode = xmlNode.SelectSingleNode("spotRate");

            if (spotRateNode != null)
            {
                if (spotRateNode.Attributes["href"] != null || spotRateNode.Attributes["id"] != null)
                {
                    if (spotRateNode.Attributes["id"] != null)
                    {
                        spotRateIDRef_ = spotRateNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(spotRateNode);
                        IDManager.SetID(spotRateIDRef_, ob);
                    }
                    else if (spotRateNode.Attributes["href"] != null)
                    {
                        spotRateIDRef_ = spotRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        spotRate_ = new PositiveDecimal(spotRateNode);
                    }
                }
                else
                {
                    spotRate_ = new PositiveDecimal(spotRateNode);
                }
            }


            XmlNode forwardPointsNode = xmlNode.SelectSingleNode("forwardPoints");

            if (forwardPointsNode != null)
            {
                if (forwardPointsNode.Attributes["href"] != null || forwardPointsNode.Attributes["id"] != null)
                {
                    if (forwardPointsNode.Attributes["id"] != null)
                    {
                        forwardPointsIDRef_ = forwardPointsNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(forwardPointsNode);
                        IDManager.SetID(forwardPointsIDRef_, ob);
                    }
                    else if (forwardPointsNode.Attributes["href"] != null)
                    {
                        forwardPointsIDRef_ = forwardPointsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        forwardPoints_ = new XsdTypeDecimal(forwardPointsNode);
                    }
                }
                else
                {
                    forwardPoints_ = new XsdTypeDecimal(forwardPointsNode);
                }
            }
        }
        public FxBarrierFeature(XmlNode xmlNode)
        {
            XmlNode barrierTypeNode = xmlNode.SelectSingleNode("barrierType");

            if (barrierTypeNode != null)
            {
                if (barrierTypeNode.Attributes["href"] != null || barrierTypeNode.Attributes["id"] != null)
                {
                    if (barrierTypeNode.Attributes["id"] != null)
                    {
                        barrierTypeIDRef_ = barrierTypeNode.Attributes["id"].Value;
                        FxBarrierTypeEnum ob = new FxBarrierTypeEnum(barrierTypeNode);
                        IDManager.SetID(barrierTypeIDRef_, ob);
                    }
                    else if (barrierTypeNode.Attributes["href"] != null)
                    {
                        barrierTypeIDRef_ = barrierTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        barrierType_ = new FxBarrierTypeEnum(barrierTypeNode);
                    }
                }
                else
                {
                    barrierType_ = new FxBarrierTypeEnum(barrierTypeNode);
                }
            }


            XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");

            if (quotedCurrencyPairNode != null)
            {
                if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null)
                {
                    if (quotedCurrencyPairNode.Attributes["id"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                        QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                        IDManager.SetID(quotedCurrencyPairIDRef_, ob);
                    }
                    else if (quotedCurrencyPairNode.Attributes["href"] != null)
                    {
                        quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                    }
                }
                else
                {
                    quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
                }
            }


            XmlNode triggerRateNode = xmlNode.SelectSingleNode("triggerRate");

            if (triggerRateNode != null)
            {
                if (triggerRateNode.Attributes["href"] != null || triggerRateNode.Attributes["id"] != null)
                {
                    if (triggerRateNode.Attributes["id"] != null)
                    {
                        triggerRateIDRef_ = triggerRateNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(triggerRateNode);
                        IDManager.SetID(triggerRateIDRef_, ob);
                    }
                    else if (triggerRateNode.Attributes["href"] != null)
                    {
                        triggerRateIDRef_ = triggerRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        triggerRate_ = new PositiveDecimal(triggerRateNode);
                    }
                }
                else
                {
                    triggerRate_ = new PositiveDecimal(triggerRateNode);
                }
            }


            XmlNodeList informationSourceNodeList = xmlNode.SelectNodes("informationSource");

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


            XmlNode observationStartDateNode = xmlNode.SelectSingleNode("observationStartDate");

            if (observationStartDateNode != null)
            {
                if (observationStartDateNode.Attributes["href"] != null || observationStartDateNode.Attributes["id"] != null)
                {
                    if (observationStartDateNode.Attributes["id"] != null)
                    {
                        observationStartDateIDRef_ = observationStartDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(observationStartDateNode);
                        IDManager.SetID(observationStartDateIDRef_, ob);
                    }
                    else if (observationStartDateNode.Attributes["href"] != null)
                    {
                        observationStartDateIDRef_ = observationStartDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        observationStartDate_ = new XsdTypeDate(observationStartDateNode);
                    }
                }
                else
                {
                    observationStartDate_ = new XsdTypeDate(observationStartDateNode);
                }
            }


            XmlNode observationEndDateNode = xmlNode.SelectSingleNode("observationEndDate");

            if (observationEndDateNode != null)
            {
                if (observationEndDateNode.Attributes["href"] != null || observationEndDateNode.Attributes["id"] != null)
                {
                    if (observationEndDateNode.Attributes["id"] != null)
                    {
                        observationEndDateIDRef_ = observationEndDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(observationEndDateNode);
                        IDManager.SetID(observationEndDateIDRef_, ob);
                    }
                    else if (observationEndDateNode.Attributes["href"] != null)
                    {
                        observationEndDateIDRef_ = observationEndDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        observationEndDate_ = new XsdTypeDate(observationEndDateNode);
                    }
                }
                else
                {
                    observationEndDate_ = new XsdTypeDate(observationEndDateNode);
                }
            }
        }
Exemple #49
0
        public OptionBaseExtended(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode premiumNode = xmlNode.SelectSingleNode("premium");

            if (premiumNode != null)
            {
                if (premiumNode.Attributes["href"] != null || premiumNode.Attributes["id"] != null)
                {
                    if (premiumNode.Attributes["id"] != null)
                    {
                        premiumIDRef_ = premiumNode.Attributes["id"].Value;
                        Premium ob = new Premium(premiumNode);
                        IDManager.SetID(premiumIDRef_, ob);
                    }
                    else if (premiumNode.Attributes["href"] != null)
                    {
                        premiumIDRef_ = premiumNode.Attributes["href"].Value;
                    }
                    else
                    {
                        premium_ = new Premium(premiumNode);
                    }
                }
                else
                {
                    premium_ = new Premium(premiumNode);
                }
            }


            XmlNode exerciseNode = xmlNode.SelectSingleNode("exercise");

            if (exerciseNode != null)
            {
                if (exerciseNode.Attributes["href"] != null || exerciseNode.Attributes["id"] != null)
                {
                    if (exerciseNode.Attributes["id"] != null)
                    {
                        exerciseIDRef_ = exerciseNode.Attributes["id"].Value;
                        Exercise ob = new Exercise(exerciseNode);
                        IDManager.SetID(exerciseIDRef_, ob);
                    }
                    else if (exerciseNode.Attributes["href"] != null)
                    {
                        exerciseIDRef_ = exerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exercise_ = new Exercise(exerciseNode);
                    }
                }
                else
                {
                    exercise_ = new Exercise(exerciseNode);
                }
            }


            XmlNode americanExerciseNode = xmlNode.SelectSingleNode("americanExercise");

            if (americanExerciseNode != null)
            {
                if (americanExerciseNode.Attributes["href"] != null || americanExerciseNode.Attributes["id"] != null)
                {
                    if (americanExerciseNode.Attributes["id"] != null)
                    {
                        americanExerciseIDRef_ = americanExerciseNode.Attributes["id"].Value;
                        AmericanExercise ob = new AmericanExercise(americanExerciseNode);
                        IDManager.SetID(americanExerciseIDRef_, ob);
                    }
                    else if (americanExerciseNode.Attributes["href"] != null)
                    {
                        americanExerciseIDRef_ = americanExerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        americanExercise_ = new AmericanExercise(americanExerciseNode);
                    }
                }
                else
                {
                    americanExercise_ = new AmericanExercise(americanExerciseNode);
                }
            }


            XmlNode bermudaExerciseNode = xmlNode.SelectSingleNode("bermudaExercise");

            if (bermudaExerciseNode != null)
            {
                if (bermudaExerciseNode.Attributes["href"] != null || bermudaExerciseNode.Attributes["id"] != null)
                {
                    if (bermudaExerciseNode.Attributes["id"] != null)
                    {
                        bermudaExerciseIDRef_ = bermudaExerciseNode.Attributes["id"].Value;
                        BermudaExercise ob = new BermudaExercise(bermudaExerciseNode);
                        IDManager.SetID(bermudaExerciseIDRef_, ob);
                    }
                    else if (bermudaExerciseNode.Attributes["href"] != null)
                    {
                        bermudaExerciseIDRef_ = bermudaExerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        bermudaExercise_ = new BermudaExercise(bermudaExerciseNode);
                    }
                }
                else
                {
                    bermudaExercise_ = new BermudaExercise(bermudaExerciseNode);
                }
            }


            XmlNode europeanExerciseNode = xmlNode.SelectSingleNode("europeanExercise");

            if (europeanExerciseNode != null)
            {
                if (europeanExerciseNode.Attributes["href"] != null || europeanExerciseNode.Attributes["id"] != null)
                {
                    if (europeanExerciseNode.Attributes["id"] != null)
                    {
                        europeanExerciseIDRef_ = europeanExerciseNode.Attributes["id"].Value;
                        EuropeanExercise ob = new EuropeanExercise(europeanExerciseNode);
                        IDManager.SetID(europeanExerciseIDRef_, ob);
                    }
                    else if (europeanExerciseNode.Attributes["href"] != null)
                    {
                        europeanExerciseIDRef_ = europeanExerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        europeanExercise_ = new EuropeanExercise(europeanExerciseNode);
                    }
                }
                else
                {
                    europeanExercise_ = new EuropeanExercise(europeanExerciseNode);
                }
            }


            XmlNode exerciseProcedureNode = xmlNode.SelectSingleNode("exerciseProcedure");

            if (exerciseProcedureNode != null)
            {
                if (exerciseProcedureNode.Attributes["href"] != null || exerciseProcedureNode.Attributes["id"] != null)
                {
                    if (exerciseProcedureNode.Attributes["id"] != null)
                    {
                        exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["id"].Value;
                        ExerciseProcedure ob = new ExerciseProcedure(exerciseProcedureNode);
                        IDManager.SetID(exerciseProcedureIDRef_, ob);
                    }
                    else if (exerciseProcedureNode.Attributes["href"] != null)
                    {
                        exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode);
                    }
                }
                else
                {
                    exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode);
                }
            }


            XmlNode featureNode = xmlNode.SelectSingleNode("feature");

            if (featureNode != null)
            {
                if (featureNode.Attributes["href"] != null || featureNode.Attributes["id"] != null)
                {
                    if (featureNode.Attributes["id"] != null)
                    {
                        featureIDRef_ = featureNode.Attributes["id"].Value;
                        OptionFeature ob = new OptionFeature(featureNode);
                        IDManager.SetID(featureIDRef_, ob);
                    }
                    else if (featureNode.Attributes["href"] != null)
                    {
                        featureIDRef_ = featureNode.Attributes["href"].Value;
                    }
                    else
                    {
                        feature_ = new OptionFeature(featureNode);
                    }
                }
                else
                {
                    feature_ = new OptionFeature(featureNode);
                }
            }


            XmlNode notionalReferenceNode = xmlNode.SelectSingleNode("notionalReference");

            if (notionalReferenceNode != null)
            {
                if (notionalReferenceNode.Attributes["href"] != null || notionalReferenceNode.Attributes["id"] != null)
                {
                    if (notionalReferenceNode.Attributes["id"] != null)
                    {
                        notionalReferenceIDRef_ = notionalReferenceNode.Attributes["id"].Value;
                        NotionalAmountReference ob = new NotionalAmountReference(notionalReferenceNode);
                        IDManager.SetID(notionalReferenceIDRef_, ob);
                    }
                    else if (notionalReferenceNode.Attributes["href"] != null)
                    {
                        notionalReferenceIDRef_ = notionalReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        notionalReference_ = new NotionalAmountReference(notionalReferenceNode);
                    }
                }
                else
                {
                    notionalReference_ = new NotionalAmountReference(notionalReferenceNode);
                }
            }


            XmlNode notionalAmountNode = xmlNode.SelectSingleNode("notionalAmount");

            if (notionalAmountNode != null)
            {
                if (notionalAmountNode.Attributes["href"] != null || notionalAmountNode.Attributes["id"] != null)
                {
                    if (notionalAmountNode.Attributes["id"] != null)
                    {
                        notionalAmountIDRef_ = notionalAmountNode.Attributes["id"].Value;
                        Money ob = new Money(notionalAmountNode);
                        IDManager.SetID(notionalAmountIDRef_, ob);
                    }
                    else if (notionalAmountNode.Attributes["href"] != null)
                    {
                        notionalAmountIDRef_ = notionalAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        notionalAmount_ = new Money(notionalAmountNode);
                    }
                }
                else
                {
                    notionalAmount_ = new Money(notionalAmountNode);
                }
            }


            XmlNode optionEntitlementNode = xmlNode.SelectSingleNode("optionEntitlement");

            if (optionEntitlementNode != null)
            {
                if (optionEntitlementNode.Attributes["href"] != null || optionEntitlementNode.Attributes["id"] != null)
                {
                    if (optionEntitlementNode.Attributes["id"] != null)
                    {
                        optionEntitlementIDRef_ = optionEntitlementNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(optionEntitlementNode);
                        IDManager.SetID(optionEntitlementIDRef_, ob);
                    }
                    else if (optionEntitlementNode.Attributes["href"] != null)
                    {
                        optionEntitlementIDRef_ = optionEntitlementNode.Attributes["href"].Value;
                    }
                    else
                    {
                        optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
                    }
                }
                else
                {
                    optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
                }
            }


            XmlNode entitlementCurrencyNode = xmlNode.SelectSingleNode("entitlementCurrency");

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


            XmlNode numberOfOptionsNode = xmlNode.SelectSingleNode("numberOfOptions");

            if (numberOfOptionsNode != null)
            {
                if (numberOfOptionsNode.Attributes["href"] != null || numberOfOptionsNode.Attributes["id"] != null)
                {
                    if (numberOfOptionsNode.Attributes["id"] != null)
                    {
                        numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(numberOfOptionsNode);
                        IDManager.SetID(numberOfOptionsIDRef_, ob);
                    }
                    else if (numberOfOptionsNode.Attributes["href"] != null)
                    {
                        numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        numberOfOptions_ = new PositiveDecimal(numberOfOptionsNode);
                    }
                }
                else
                {
                    numberOfOptions_ = new PositiveDecimal(numberOfOptionsNode);
                }
            }


            XmlNode settlementTypeNode = xmlNode.SelectSingleNode("settlementType");

            if (settlementTypeNode != null)
            {
                if (settlementTypeNode.Attributes["href"] != null || settlementTypeNode.Attributes["id"] != null)
                {
                    if (settlementTypeNode.Attributes["id"] != null)
                    {
                        settlementTypeIDRef_ = settlementTypeNode.Attributes["id"].Value;
                        SettlementTypeEnum ob = new SettlementTypeEnum(settlementTypeNode);
                        IDManager.SetID(settlementTypeIDRef_, ob);
                    }
                    else if (settlementTypeNode.Attributes["href"] != null)
                    {
                        settlementTypeIDRef_ = settlementTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settlementType_ = new SettlementTypeEnum(settlementTypeNode);
                    }
                }
                else
                {
                    settlementType_ = new SettlementTypeEnum(settlementTypeNode);
                }
            }


            XmlNode settlementDateNode = xmlNode.SelectSingleNode("settlementDate");

            if (settlementDateNode != null)
            {
                if (settlementDateNode.Attributes["href"] != null || settlementDateNode.Attributes["id"] != null)
                {
                    if (settlementDateNode.Attributes["id"] != null)
                    {
                        settlementDateIDRef_ = settlementDateNode.Attributes["id"].Value;
                        AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(settlementDateNode);
                        IDManager.SetID(settlementDateIDRef_, ob);
                    }
                    else if (settlementDateNode.Attributes["href"] != null)
                    {
                        settlementDateIDRef_ = settlementDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode);
                    }
                }
                else
                {
                    settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode);
                }
            }


            XmlNode settlementAmountNode = xmlNode.SelectSingleNode("settlementAmount");

            if (settlementAmountNode != null)
            {
                if (settlementAmountNode.Attributes["href"] != null || settlementAmountNode.Attributes["id"] != null)
                {
                    if (settlementAmountNode.Attributes["id"] != null)
                    {
                        settlementAmountIDRef_ = settlementAmountNode.Attributes["id"].Value;
                        Money ob = new Money(settlementAmountNode);
                        IDManager.SetID(settlementAmountIDRef_, ob);
                    }
                    else if (settlementAmountNode.Attributes["href"] != null)
                    {
                        settlementAmountIDRef_ = settlementAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settlementAmount_ = new Money(settlementAmountNode);
                    }
                }
                else
                {
                    settlementAmount_ = new Money(settlementAmountNode);
                }
            }


            XmlNode settlementCurrencyNode = xmlNode.SelectSingleNode("settlementCurrency");

            if (settlementCurrencyNode != null)
            {
                if (settlementCurrencyNode.Attributes["href"] != null || settlementCurrencyNode.Attributes["id"] != null)
                {
                    if (settlementCurrencyNode.Attributes["id"] != null)
                    {
                        settlementCurrencyIDRef_ = settlementCurrencyNode.Attributes["id"].Value;
                        Currency ob = new Currency(settlementCurrencyNode);
                        IDManager.SetID(settlementCurrencyIDRef_, ob);
                    }
                    else if (settlementCurrencyNode.Attributes["href"] != null)
                    {
                        settlementCurrencyIDRef_ = settlementCurrencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settlementCurrency_ = new Currency(settlementCurrencyNode);
                    }
                }
                else
                {
                    settlementCurrency_ = new Currency(settlementCurrencyNode);
                }
            }
        }
 public DividendPeriodPayment(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode fixedStrikeNode = xmlNode.SelectSingleNode("fixedStrike");
     
     if (fixedStrikeNode != null)
     {
         if (fixedStrikeNode.Attributes["href"] != null || fixedStrikeNode.Attributes["id"] != null) 
         {
             if (fixedStrikeNode.Attributes["id"] != null) 
             {
                 fixedStrikeIDRef_ = fixedStrikeNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(fixedStrikeNode);
                 IDManager.SetID(fixedStrikeIDRef_, ob);
             }
             else if (fixedStrikeNode.Attributes["href"] != null)
             {
                 fixedStrikeIDRef_ = fixedStrikeNode.Attributes["href"].Value;
             }
             else
             {
                 fixedStrike_ = new PositiveDecimal(fixedStrikeNode);
             }
         }
         else
         {
             fixedStrike_ = new PositiveDecimal(fixedStrikeNode);
         }
     }
     
 
     XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");
     
     if (paymentDateNode != null)
     {
         if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null) 
         {
             if (paymentDateNode.Attributes["id"] != null) 
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(paymentDateNode);
                 IDManager.SetID(paymentDateIDRef_, ob);
             }
             else if (paymentDateNode.Attributes["href"] != null)
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDate_ = new AdjustableOrRelativeDate(paymentDateNode);
             }
         }
         else
         {
             paymentDate_ = new AdjustableOrRelativeDate(paymentDateNode);
         }
     }
     
 
     XmlNode valuationDateNode = xmlNode.SelectSingleNode("valuationDate");
     
     if (valuationDateNode != null)
     {
         if (valuationDateNode.Attributes["href"] != null || valuationDateNode.Attributes["id"] != null) 
         {
             if (valuationDateNode.Attributes["id"] != null) 
             {
                 valuationDateIDRef_ = valuationDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(valuationDateNode);
                 IDManager.SetID(valuationDateIDRef_, ob);
             }
             else if (valuationDateNode.Attributes["href"] != null)
             {
                 valuationDateIDRef_ = valuationDateNode.Attributes["href"].Value;
             }
             else
             {
                 valuationDate_ = new AdjustableOrRelativeDate(valuationDateNode);
             }
         }
         else
         {
             valuationDate_ = new AdjustableOrRelativeDate(valuationDateNode);
         }
     }
     
 
 }
 public FxOption(XmlNode xmlNode)
 : base(xmlNode)
 {
     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;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(effectiveDateNode);
                 IDManager.SetID(effectiveDateIDRef_, ob);
             }
             else if (effectiveDateNode.Attributes["href"] != null)
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode);
             }
         }
         else
         {
             effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode);
         }
     }
     
 
     XmlNode tenorPeriodNode = xmlNode.SelectSingleNode("tenorPeriod");
     
     if (tenorPeriodNode != null)
     {
         if (tenorPeriodNode.Attributes["href"] != null || tenorPeriodNode.Attributes["id"] != null) 
         {
             if (tenorPeriodNode.Attributes["id"] != null) 
             {
                 tenorPeriodIDRef_ = tenorPeriodNode.Attributes["id"].Value;
                 Period ob = new Period(tenorPeriodNode);
                 IDManager.SetID(tenorPeriodIDRef_, ob);
             }
             else if (tenorPeriodNode.Attributes["href"] != null)
             {
                 tenorPeriodIDRef_ = tenorPeriodNode.Attributes["href"].Value;
             }
             else
             {
                 tenorPeriod_ = new Period(tenorPeriodNode);
             }
         }
         else
         {
             tenorPeriod_ = new Period(tenorPeriodNode);
         }
     }
     
 
     XmlNode americanExerciseNode = xmlNode.SelectSingleNode("americanExercise");
     
     if (americanExerciseNode != null)
     {
         if (americanExerciseNode.Attributes["href"] != null || americanExerciseNode.Attributes["id"] != null) 
         {
             if (americanExerciseNode.Attributes["id"] != null) 
             {
                 americanExerciseIDRef_ = americanExerciseNode.Attributes["id"].Value;
                 FxAmericanExercise ob = new FxAmericanExercise(americanExerciseNode);
                 IDManager.SetID(americanExerciseIDRef_, ob);
             }
             else if (americanExerciseNode.Attributes["href"] != null)
             {
                 americanExerciseIDRef_ = americanExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 americanExercise_ = new FxAmericanExercise(americanExerciseNode);
             }
         }
         else
         {
             americanExercise_ = new FxAmericanExercise(americanExerciseNode);
         }
     }
     
 
     XmlNode europeanExerciseNode = xmlNode.SelectSingleNode("europeanExercise");
     
     if (europeanExerciseNode != null)
     {
         if (europeanExerciseNode.Attributes["href"] != null || europeanExerciseNode.Attributes["id"] != null) 
         {
             if (europeanExerciseNode.Attributes["id"] != null) 
             {
                 europeanExerciseIDRef_ = europeanExerciseNode.Attributes["id"].Value;
                 FxEuropeanExercise ob = new FxEuropeanExercise(europeanExerciseNode);
                 IDManager.SetID(europeanExerciseIDRef_, ob);
             }
             else if (europeanExerciseNode.Attributes["href"] != null)
             {
                 europeanExerciseIDRef_ = europeanExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 europeanExercise_ = new FxEuropeanExercise(europeanExerciseNode);
             }
         }
         else
         {
             europeanExercise_ = new FxEuropeanExercise(europeanExerciseNode);
         }
     }
     
 
     XmlNode exerciseProcedureNode = xmlNode.SelectSingleNode("exerciseProcedure");
     
     if (exerciseProcedureNode != null)
     {
         if (exerciseProcedureNode.Attributes["href"] != null || exerciseProcedureNode.Attributes["id"] != null) 
         {
             if (exerciseProcedureNode.Attributes["id"] != null) 
             {
                 exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["id"].Value;
                 ExerciseProcedure ob = new ExerciseProcedure(exerciseProcedureNode);
                 IDManager.SetID(exerciseProcedureIDRef_, ob);
             }
             else if (exerciseProcedureNode.Attributes["href"] != null)
             {
                 exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["href"].Value;
             }
             else
             {
                 exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode);
             }
         }
         else
         {
             exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode);
         }
     }
     
 
     XmlNode putCurrencyAmountNode = xmlNode.SelectSingleNode("putCurrencyAmount");
     
     if (putCurrencyAmountNode != null)
     {
         if (putCurrencyAmountNode.Attributes["href"] != null || putCurrencyAmountNode.Attributes["id"] != null) 
         {
             if (putCurrencyAmountNode.Attributes["id"] != null) 
             {
                 putCurrencyAmountIDRef_ = putCurrencyAmountNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(putCurrencyAmountNode);
                 IDManager.SetID(putCurrencyAmountIDRef_, ob);
             }
             else if (putCurrencyAmountNode.Attributes["href"] != null)
             {
                 putCurrencyAmountIDRef_ = putCurrencyAmountNode.Attributes["href"].Value;
             }
             else
             {
                 putCurrencyAmount_ = new NonNegativeMoney(putCurrencyAmountNode);
             }
         }
         else
         {
             putCurrencyAmount_ = new NonNegativeMoney(putCurrencyAmountNode);
         }
     }
     
 
     XmlNode callCurrencyAmountNode = xmlNode.SelectSingleNode("callCurrencyAmount");
     
     if (callCurrencyAmountNode != null)
     {
         if (callCurrencyAmountNode.Attributes["href"] != null || callCurrencyAmountNode.Attributes["id"] != null) 
         {
             if (callCurrencyAmountNode.Attributes["id"] != null) 
             {
                 callCurrencyAmountIDRef_ = callCurrencyAmountNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(callCurrencyAmountNode);
                 IDManager.SetID(callCurrencyAmountIDRef_, ob);
             }
             else if (callCurrencyAmountNode.Attributes["href"] != null)
             {
                 callCurrencyAmountIDRef_ = callCurrencyAmountNode.Attributes["href"].Value;
             }
             else
             {
                 callCurrencyAmount_ = new NonNegativeMoney(callCurrencyAmountNode);
             }
         }
         else
         {
             callCurrencyAmount_ = new NonNegativeMoney(callCurrencyAmountNode);
         }
     }
     
 
     XmlNode soldAsNode = xmlNode.SelectSingleNode("soldAs");
     
     if (soldAsNode != null)
     {
         if (soldAsNode.Attributes["href"] != null || soldAsNode.Attributes["id"] != null) 
         {
             if (soldAsNode.Attributes["id"] != null) 
             {
                 soldAsIDRef_ = soldAsNode.Attributes["id"].Value;
                 PutCallEnum ob = new PutCallEnum(soldAsNode);
                 IDManager.SetID(soldAsIDRef_, ob);
             }
             else if (soldAsNode.Attributes["href"] != null)
             {
                 soldAsIDRef_ = soldAsNode.Attributes["href"].Value;
             }
             else
             {
                 soldAs_ = new PutCallEnum(soldAsNode);
             }
         }
         else
         {
             soldAs_ = new PutCallEnum(soldAsNode);
         }
     }
     
 
     XmlNode strikeNode = xmlNode.SelectSingleNode("strike");
     
     if (strikeNode != null)
     {
         if (strikeNode.Attributes["href"] != null || strikeNode.Attributes["id"] != null) 
         {
             if (strikeNode.Attributes["id"] != null) 
             {
                 strikeIDRef_ = strikeNode.Attributes["id"].Value;
                 FxStrikePrice ob = new FxStrikePrice(strikeNode);
                 IDManager.SetID(strikeIDRef_, ob);
             }
             else if (strikeNode.Attributes["href"] != null)
             {
                 strikeIDRef_ = strikeNode.Attributes["href"].Value;
             }
             else
             {
                 strike_ = new FxStrikePrice(strikeNode);
             }
         }
         else
         {
             strike_ = new FxStrikePrice(strikeNode);
         }
     }
     
 
     XmlNode spotRateNode = xmlNode.SelectSingleNode("spotRate");
     
     if (spotRateNode != null)
     {
         if (spotRateNode.Attributes["href"] != null || spotRateNode.Attributes["id"] != null) 
         {
             if (spotRateNode.Attributes["id"] != null) 
             {
                 spotRateIDRef_ = spotRateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(spotRateNode);
                 IDManager.SetID(spotRateIDRef_, ob);
             }
             else if (spotRateNode.Attributes["href"] != null)
             {
                 spotRateIDRef_ = spotRateNode.Attributes["href"].Value;
             }
             else
             {
                 spotRate_ = new PositiveDecimal(spotRateNode);
             }
         }
         else
         {
             spotRate_ = new PositiveDecimal(spotRateNode);
         }
     }
     
 
     XmlNode featuresNode = xmlNode.SelectSingleNode("features");
     
     if (featuresNode != null)
     {
         if (featuresNode.Attributes["href"] != null || featuresNode.Attributes["id"] != null) 
         {
             if (featuresNode.Attributes["id"] != null) 
             {
                 featuresIDRef_ = featuresNode.Attributes["id"].Value;
                 FxOptionFeatures ob = new FxOptionFeatures(featuresNode);
                 IDManager.SetID(featuresIDRef_, ob);
             }
             else if (featuresNode.Attributes["href"] != null)
             {
                 featuresIDRef_ = featuresNode.Attributes["href"].Value;
             }
             else
             {
                 features_ = new FxOptionFeatures(featuresNode);
             }
         }
         else
         {
             features_ = new FxOptionFeatures(featuresNode);
         }
     }
     
 
     XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium");
     
     if (premiumNodeList != null)
     {
         this.premium_ = new List<FxOptionPremium>();
         foreach (XmlNode item in premiumNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     premiumIDRef_ = item.Attributes["id"].Value;
                     premium_.Add(new FxOptionPremium(item));
                     IDManager.SetID(premiumIDRef_, premium_[premium_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     premiumIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 premium_.Add(new FxOptionPremium(item));
                 }
             }
             else
             {
                 premium_.Add(new FxOptionPremium(item));
             }
         }
     }
     
 
     XmlNode cashSettlementNode = xmlNode.SelectSingleNode("cashSettlement");
     
     if (cashSettlementNode != null)
     {
         if (cashSettlementNode.Attributes["href"] != null || cashSettlementNode.Attributes["id"] != null) 
         {
             if (cashSettlementNode.Attributes["id"] != null) 
             {
                 cashSettlementIDRef_ = cashSettlementNode.Attributes["id"].Value;
                 FxCashSettlement ob = new FxCashSettlement(cashSettlementNode);
                 IDManager.SetID(cashSettlementIDRef_, ob);
             }
             else if (cashSettlementNode.Attributes["href"] != null)
             {
                 cashSettlementIDRef_ = cashSettlementNode.Attributes["href"].Value;
             }
             else
             {
                 cashSettlement_ = new FxCashSettlement(cashSettlementNode);
             }
         }
         else
         {
             cashSettlement_ = new FxCashSettlement(cashSettlementNode);
         }
     }
     
 
 }