public OptionFeatures(XmlNode xmlNode)
 {
     XmlNode asianNode = xmlNode.SelectSingleNode("asian");
     
     if (asianNode != null)
     {
         if (asianNode.Attributes["href"] != null || asianNode.Attributes["id"] != null) 
         {
             if (asianNode.Attributes["id"] != null) 
             {
                 asianIDRef_ = asianNode.Attributes["id"].Value;
                 Asian ob = new Asian(asianNode);
                 IDManager.SetID(asianIDRef_, ob);
             }
             else if (asianNode.Attributes["href"] != null)
             {
                 asianIDRef_ = asianNode.Attributes["href"].Value;
             }
             else
             {
                 asian_ = new Asian(asianNode);
             }
         }
         else
         {
             asian_ = new Asian(asianNode);
         }
     }
     
 
     XmlNode barrierNode = xmlNode.SelectSingleNode("barrier");
     
     if (barrierNode != null)
     {
         if (barrierNode.Attributes["href"] != null || barrierNode.Attributes["id"] != null) 
         {
             if (barrierNode.Attributes["id"] != null) 
             {
                 barrierIDRef_ = barrierNode.Attributes["id"].Value;
                 Barrier ob = new Barrier(barrierNode);
                 IDManager.SetID(barrierIDRef_, ob);
             }
             else if (barrierNode.Attributes["href"] != null)
             {
                 barrierIDRef_ = barrierNode.Attributes["href"].Value;
             }
             else
             {
                 barrier_ = new Barrier(barrierNode);
             }
         }
         else
         {
             barrier_ = new Barrier(barrierNode);
         }
     }
     
 
     XmlNode knockNode = xmlNode.SelectSingleNode("knock");
     
     if (knockNode != null)
     {
         if (knockNode.Attributes["href"] != null || knockNode.Attributes["id"] != null) 
         {
             if (knockNode.Attributes["id"] != null) 
             {
                 knockIDRef_ = knockNode.Attributes["id"].Value;
                 Knock ob = new Knock(knockNode);
                 IDManager.SetID(knockIDRef_, ob);
             }
             else if (knockNode.Attributes["href"] != null)
             {
                 knockIDRef_ = knockNode.Attributes["href"].Value;
             }
             else
             {
                 knock_ = new Knock(knockNode);
             }
         }
         else
         {
             knock_ = new Knock(knockNode);
         }
     }
     
 
     XmlNode passThroughNode = xmlNode.SelectSingleNode("passThrough");
     
     if (passThroughNode != null)
     {
         if (passThroughNode.Attributes["href"] != null || passThroughNode.Attributes["id"] != null) 
         {
             if (passThroughNode.Attributes["id"] != null) 
             {
                 passThroughIDRef_ = passThroughNode.Attributes["id"].Value;
                 PassThrough ob = new PassThrough(passThroughNode);
                 IDManager.SetID(passThroughIDRef_, ob);
             }
             else if (passThroughNode.Attributes["href"] != null)
             {
                 passThroughIDRef_ = passThroughNode.Attributes["href"].Value;
             }
             else
             {
                 passThrough_ = new PassThrough(passThroughNode);
             }
         }
         else
         {
             passThrough_ = new PassThrough(passThroughNode);
         }
     }
     
 
     XmlNode dividendAdjustmentNode = xmlNode.SelectSingleNode("dividendAdjustment");
     
     if (dividendAdjustmentNode != null)
     {
         if (dividendAdjustmentNode.Attributes["href"] != null || dividendAdjustmentNode.Attributes["id"] != null) 
         {
             if (dividendAdjustmentNode.Attributes["id"] != null) 
             {
                 dividendAdjustmentIDRef_ = dividendAdjustmentNode.Attributes["id"].Value;
                 DividendAdjustment ob = new DividendAdjustment(dividendAdjustmentNode);
                 IDManager.SetID(dividendAdjustmentIDRef_, ob);
             }
             else if (dividendAdjustmentNode.Attributes["href"] != null)
             {
                 dividendAdjustmentIDRef_ = dividendAdjustmentNode.Attributes["href"].Value;
             }
             else
             {
                 dividendAdjustment_ = new DividendAdjustment(dividendAdjustmentNode);
             }
         }
         else
         {
             dividendAdjustment_ = new DividendAdjustment(dividendAdjustmentNode);
         }
     }
     
 
 }
 public OptionFeature(XmlNode xmlNode)
 {
     XmlNodeList fxFeatureNodeList = xmlNode.SelectNodes("fxFeature");
     if (fxFeatureNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxFeatureNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxFeatureIDRef = item.Attributes["id"].Name;
                 FxFeature ob = FxFeature();
                 IDManager.SetID(fxFeatureIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxFeatureIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxFeature = new FxFeature(item);
             }
         }
     }
     
 
     XmlNodeList strategyFeatureNodeList = xmlNode.SelectNodes("strategyFeature");
     if (strategyFeatureNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in strategyFeatureNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 strategyFeatureIDRef = item.Attributes["id"].Name;
                 StrategyFeature ob = StrategyFeature();
                 IDManager.SetID(strategyFeatureIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 strategyFeatureIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 strategyFeature = new StrategyFeature(item);
             }
         }
     }
     
 
     XmlNodeList asianNodeList = xmlNode.SelectNodes("asian");
     if (asianNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in asianNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 asianIDRef = item.Attributes["id"].Name;
                 Asian ob = Asian();
                 IDManager.SetID(asianIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 asianIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 asian = new Asian(item);
             }
         }
     }
     
 
     XmlNodeList barrierNodeList = xmlNode.SelectNodes("barrier");
     if (barrierNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in barrierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 barrierIDRef = item.Attributes["id"].Name;
                 Barrier ob = Barrier();
                 IDManager.SetID(barrierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 barrierIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 barrier = new Barrier(item);
             }
         }
     }
     
 
     XmlNodeList knockNodeList = xmlNode.SelectNodes("knock");
     if (knockNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in knockNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 knockIDRef = item.Attributes["id"].Name;
                 Knock ob = Knock();
                 IDManager.SetID(knockIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 knockIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 knock = new Knock(item);
             }
         }
     }
     
 
     XmlNodeList passThroughNodeList = xmlNode.SelectNodes("passThrough");
     if (passThroughNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in passThroughNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 passThroughIDRef = item.Attributes["id"].Name;
                 PassThrough ob = PassThrough();
                 IDManager.SetID(passThroughIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 passThroughIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 passThrough = new PassThrough(item);
             }
         }
     }
     
 
 }
Exemple #3
0
        public OptionFeature(XmlNode xmlNode)
        {
            XmlNodeList fxFeatureNodeList = xmlNode.SelectNodes("fxFeature");

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

            foreach (XmlNode item in fxFeatureNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fxFeatureIDRef = item.Attributes["id"].Name;
                        FxFeature ob = FxFeature();
                        IDManager.SetID(fxFeatureIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fxFeatureIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fxFeature = new FxFeature(item);
                    }
                }
            }


            XmlNodeList strategyFeatureNodeList = xmlNode.SelectNodes("strategyFeature");

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

            foreach (XmlNode item in strategyFeatureNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        strategyFeatureIDRef = item.Attributes["id"].Name;
                        StrategyFeature ob = StrategyFeature();
                        IDManager.SetID(strategyFeatureIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        strategyFeatureIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        strategyFeature = new StrategyFeature(item);
                    }
                }
            }


            XmlNodeList asianNodeList = xmlNode.SelectNodes("asian");

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

            foreach (XmlNode item in asianNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        asianIDRef = item.Attributes["id"].Name;
                        Asian ob = Asian();
                        IDManager.SetID(asianIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        asianIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        asian = new Asian(item);
                    }
                }
            }


            XmlNodeList barrierNodeList = xmlNode.SelectNodes("barrier");

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

            foreach (XmlNode item in barrierNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        barrierIDRef = item.Attributes["id"].Name;
                        Barrier ob = Barrier();
                        IDManager.SetID(barrierIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        barrierIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        barrier = new Barrier(item);
                    }
                }
            }


            XmlNodeList knockNodeList = xmlNode.SelectNodes("knock");

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

            foreach (XmlNode item in knockNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        knockIDRef = item.Attributes["id"].Name;
                        Knock ob = Knock();
                        IDManager.SetID(knockIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        knockIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        knock = new Knock(item);
                    }
                }
            }


            XmlNodeList passThroughNodeList = xmlNode.SelectNodes("passThrough");

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

            foreach (XmlNode item in passThroughNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        passThroughIDRef = item.Attributes["id"].Name;
                        PassThrough ob = PassThrough();
                        IDManager.SetID(passThroughIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        passThroughIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        passThrough = new PassThrough(item);
                    }
                }
            }
        }
 public OptionFeature(XmlNode xmlNode)
 {
     XmlNode fxFeatureNode = xmlNode.SelectSingleNode("fxFeature");
     
     if (fxFeatureNode != null)
     {
         if (fxFeatureNode.Attributes["href"] != null || fxFeatureNode.Attributes["id"] != null) 
         {
             if (fxFeatureNode.Attributes["id"] != null) 
             {
                 fxFeatureIDRef_ = fxFeatureNode.Attributes["id"].Value;
                 FxFeature ob = new FxFeature(fxFeatureNode);
                 IDManager.SetID(fxFeatureIDRef_, ob);
             }
             else if (fxFeatureNode.Attributes["href"] != null)
             {
                 fxFeatureIDRef_ = fxFeatureNode.Attributes["href"].Value;
             }
             else
             {
                 fxFeature_ = new FxFeature(fxFeatureNode);
             }
         }
         else
         {
             fxFeature_ = new FxFeature(fxFeatureNode);
         }
     }
     
 
     XmlNode strategyFeatureNode = xmlNode.SelectSingleNode("strategyFeature");
     
     if (strategyFeatureNode != null)
     {
         if (strategyFeatureNode.Attributes["href"] != null || strategyFeatureNode.Attributes["id"] != null) 
         {
             if (strategyFeatureNode.Attributes["id"] != null) 
             {
                 strategyFeatureIDRef_ = strategyFeatureNode.Attributes["id"].Value;
                 StrategyFeature ob = new StrategyFeature(strategyFeatureNode);
                 IDManager.SetID(strategyFeatureIDRef_, ob);
             }
             else if (strategyFeatureNode.Attributes["href"] != null)
             {
                 strategyFeatureIDRef_ = strategyFeatureNode.Attributes["href"].Value;
             }
             else
             {
                 strategyFeature_ = new StrategyFeature(strategyFeatureNode);
             }
         }
         else
         {
             strategyFeature_ = new StrategyFeature(strategyFeatureNode);
         }
     }
     
 
     XmlNode asianNode = xmlNode.SelectSingleNode("asian");
     
     if (asianNode != null)
     {
         if (asianNode.Attributes["href"] != null || asianNode.Attributes["id"] != null) 
         {
             if (asianNode.Attributes["id"] != null) 
             {
                 asianIDRef_ = asianNode.Attributes["id"].Value;
                 Asian ob = new Asian(asianNode);
                 IDManager.SetID(asianIDRef_, ob);
             }
             else if (asianNode.Attributes["href"] != null)
             {
                 asianIDRef_ = asianNode.Attributes["href"].Value;
             }
             else
             {
                 asian_ = new Asian(asianNode);
             }
         }
         else
         {
             asian_ = new Asian(asianNode);
         }
     }
     
 
     XmlNode barrierNode = xmlNode.SelectSingleNode("barrier");
     
     if (barrierNode != null)
     {
         if (barrierNode.Attributes["href"] != null || barrierNode.Attributes["id"] != null) 
         {
             if (barrierNode.Attributes["id"] != null) 
             {
                 barrierIDRef_ = barrierNode.Attributes["id"].Value;
                 Barrier ob = new Barrier(barrierNode);
                 IDManager.SetID(barrierIDRef_, ob);
             }
             else if (barrierNode.Attributes["href"] != null)
             {
                 barrierIDRef_ = barrierNode.Attributes["href"].Value;
             }
             else
             {
                 barrier_ = new Barrier(barrierNode);
             }
         }
         else
         {
             barrier_ = new Barrier(barrierNode);
         }
     }
     
 
     XmlNode knockNode = xmlNode.SelectSingleNode("knock");
     
     if (knockNode != null)
     {
         if (knockNode.Attributes["href"] != null || knockNode.Attributes["id"] != null) 
         {
             if (knockNode.Attributes["id"] != null) 
             {
                 knockIDRef_ = knockNode.Attributes["id"].Value;
                 Knock ob = new Knock(knockNode);
                 IDManager.SetID(knockIDRef_, ob);
             }
             else if (knockNode.Attributes["href"] != null)
             {
                 knockIDRef_ = knockNode.Attributes["href"].Value;
             }
             else
             {
                 knock_ = new Knock(knockNode);
             }
         }
         else
         {
             knock_ = new Knock(knockNode);
         }
     }
     
 
     XmlNode passThroughNode = xmlNode.SelectSingleNode("passThrough");
     
     if (passThroughNode != null)
     {
         if (passThroughNode.Attributes["href"] != null || passThroughNode.Attributes["id"] != null) 
         {
             if (passThroughNode.Attributes["id"] != null) 
             {
                 passThroughIDRef_ = passThroughNode.Attributes["id"].Value;
                 PassThrough ob = new PassThrough(passThroughNode);
                 IDManager.SetID(passThroughIDRef_, ob);
             }
             else if (passThroughNode.Attributes["href"] != null)
             {
                 passThroughIDRef_ = passThroughNode.Attributes["href"].Value;
             }
             else
             {
                 passThrough_ = new PassThrough(passThroughNode);
             }
         }
         else
         {
             passThrough_ = new PassThrough(passThroughNode);
         }
     }
     
 
 }
        public OptionFeature(XmlNode xmlNode)
        {
            XmlNode fxFeatureNode = xmlNode.SelectSingleNode("fxFeature");

            if (fxFeatureNode != null)
            {
                if (fxFeatureNode.Attributes["href"] != null || fxFeatureNode.Attributes["id"] != null)
                {
                    if (fxFeatureNode.Attributes["id"] != null)
                    {
                        fxFeatureIDRef_ = fxFeatureNode.Attributes["id"].Value;
                        FxFeature ob = new FxFeature(fxFeatureNode);
                        IDManager.SetID(fxFeatureIDRef_, ob);
                    }
                    else if (fxFeatureNode.Attributes["href"] != null)
                    {
                        fxFeatureIDRef_ = fxFeatureNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fxFeature_ = new FxFeature(fxFeatureNode);
                    }
                }
                else
                {
                    fxFeature_ = new FxFeature(fxFeatureNode);
                }
            }


            XmlNode strategyFeatureNode = xmlNode.SelectSingleNode("strategyFeature");

            if (strategyFeatureNode != null)
            {
                if (strategyFeatureNode.Attributes["href"] != null || strategyFeatureNode.Attributes["id"] != null)
                {
                    if (strategyFeatureNode.Attributes["id"] != null)
                    {
                        strategyFeatureIDRef_ = strategyFeatureNode.Attributes["id"].Value;
                        StrategyFeature ob = new StrategyFeature(strategyFeatureNode);
                        IDManager.SetID(strategyFeatureIDRef_, ob);
                    }
                    else if (strategyFeatureNode.Attributes["href"] != null)
                    {
                        strategyFeatureIDRef_ = strategyFeatureNode.Attributes["href"].Value;
                    }
                    else
                    {
                        strategyFeature_ = new StrategyFeature(strategyFeatureNode);
                    }
                }
                else
                {
                    strategyFeature_ = new StrategyFeature(strategyFeatureNode);
                }
            }


            XmlNode asianNode = xmlNode.SelectSingleNode("asian");

            if (asianNode != null)
            {
                if (asianNode.Attributes["href"] != null || asianNode.Attributes["id"] != null)
                {
                    if (asianNode.Attributes["id"] != null)
                    {
                        asianIDRef_ = asianNode.Attributes["id"].Value;
                        Asian ob = new Asian(asianNode);
                        IDManager.SetID(asianIDRef_, ob);
                    }
                    else if (asianNode.Attributes["href"] != null)
                    {
                        asianIDRef_ = asianNode.Attributes["href"].Value;
                    }
                    else
                    {
                        asian_ = new Asian(asianNode);
                    }
                }
                else
                {
                    asian_ = new Asian(asianNode);
                }
            }


            XmlNode barrierNode = xmlNode.SelectSingleNode("barrier");

            if (barrierNode != null)
            {
                if (barrierNode.Attributes["href"] != null || barrierNode.Attributes["id"] != null)
                {
                    if (barrierNode.Attributes["id"] != null)
                    {
                        barrierIDRef_ = barrierNode.Attributes["id"].Value;
                        Barrier ob = new Barrier(barrierNode);
                        IDManager.SetID(barrierIDRef_, ob);
                    }
                    else if (barrierNode.Attributes["href"] != null)
                    {
                        barrierIDRef_ = barrierNode.Attributes["href"].Value;
                    }
                    else
                    {
                        barrier_ = new Barrier(barrierNode);
                    }
                }
                else
                {
                    barrier_ = new Barrier(barrierNode);
                }
            }


            XmlNode knockNode = xmlNode.SelectSingleNode("knock");

            if (knockNode != null)
            {
                if (knockNode.Attributes["href"] != null || knockNode.Attributes["id"] != null)
                {
                    if (knockNode.Attributes["id"] != null)
                    {
                        knockIDRef_ = knockNode.Attributes["id"].Value;
                        Knock ob = new Knock(knockNode);
                        IDManager.SetID(knockIDRef_, ob);
                    }
                    else if (knockNode.Attributes["href"] != null)
                    {
                        knockIDRef_ = knockNode.Attributes["href"].Value;
                    }
                    else
                    {
                        knock_ = new Knock(knockNode);
                    }
                }
                else
                {
                    knock_ = new Knock(knockNode);
                }
            }


            XmlNode passThroughNode = xmlNode.SelectSingleNode("passThrough");

            if (passThroughNode != null)
            {
                if (passThroughNode.Attributes["href"] != null || passThroughNode.Attributes["id"] != null)
                {
                    if (passThroughNode.Attributes["id"] != null)
                    {
                        passThroughIDRef_ = passThroughNode.Attributes["id"].Value;
                        PassThrough ob = new PassThrough(passThroughNode);
                        IDManager.SetID(passThroughIDRef_, ob);
                    }
                    else if (passThroughNode.Attributes["href"] != null)
                    {
                        passThroughIDRef_ = passThroughNode.Attributes["href"].Value;
                    }
                    else
                    {
                        passThrough_ = new PassThrough(passThroughNode);
                    }
                }
                else
                {
                    passThrough_ = new PassThrough(passThroughNode);
                }
            }
        }
        public OptionFeatures(XmlNode xmlNode)
        {
            XmlNodeList asianNodeList = xmlNode.SelectNodes("asian");

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

            foreach (XmlNode item in asianNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        asianIDRef = item.Attributes["id"].Name;
                        Asian ob = Asian();
                        IDManager.SetID(asianIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        asianIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        asian = new Asian(item);
                    }
                }
            }


            XmlNodeList barrierNodeList = xmlNode.SelectNodes("barrier");

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

            foreach (XmlNode item in barrierNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        barrierIDRef = item.Attributes["id"].Name;
                        Barrier ob = Barrier();
                        IDManager.SetID(barrierIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        barrierIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        barrier = new Barrier(item);
                    }
                }
            }


            XmlNodeList knockNodeList = xmlNode.SelectNodes("knock");

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

            foreach (XmlNode item in knockNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        knockIDRef = item.Attributes["id"].Name;
                        Knock ob = Knock();
                        IDManager.SetID(knockIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        knockIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        knock = new Knock(item);
                    }
                }
            }


            XmlNodeList passThroughNodeList = xmlNode.SelectNodes("passThrough");

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

            foreach (XmlNode item in passThroughNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        passThroughIDRef = item.Attributes["id"].Name;
                        PassThrough ob = PassThrough();
                        IDManager.SetID(passThroughIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        passThroughIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        passThrough = new PassThrough(item);
                    }
                }
            }


            XmlNodeList dividendAdjustmentNodeList = xmlNode.SelectNodes("dividendAdjustment");

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

            foreach (XmlNode item in dividendAdjustmentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        dividendAdjustmentIDRef = item.Attributes["id"].Name;
                        DividendAdjustment ob = DividendAdjustment();
                        IDManager.SetID(dividendAdjustmentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        dividendAdjustmentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        dividendAdjustment = new DividendAdjustment(item);
                    }
                }
            }
        }
 public OptionFeatures(XmlNode xmlNode)
 {
     XmlNodeList asianNodeList = xmlNode.SelectNodes("asian");
     if (asianNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in asianNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 asianIDRef = item.Attributes["id"].Name;
                 Asian ob = Asian();
                 IDManager.SetID(asianIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 asianIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 asian = new Asian(item);
             }
         }
     }
     
 
     XmlNodeList barrierNodeList = xmlNode.SelectNodes("barrier");
     if (barrierNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in barrierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 barrierIDRef = item.Attributes["id"].Name;
                 Barrier ob = Barrier();
                 IDManager.SetID(barrierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 barrierIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 barrier = new Barrier(item);
             }
         }
     }
     
 
     XmlNodeList knockNodeList = xmlNode.SelectNodes("knock");
     if (knockNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in knockNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 knockIDRef = item.Attributes["id"].Name;
                 Knock ob = Knock();
                 IDManager.SetID(knockIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 knockIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 knock = new Knock(item);
             }
         }
     }
     
 
     XmlNodeList passThroughNodeList = xmlNode.SelectNodes("passThrough");
     if (passThroughNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in passThroughNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 passThroughIDRef = item.Attributes["id"].Name;
                 PassThrough ob = PassThrough();
                 IDManager.SetID(passThroughIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 passThroughIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 passThrough = new PassThrough(item);
             }
         }
     }
     
 
     XmlNodeList dividendAdjustmentNodeList = xmlNode.SelectNodes("dividendAdjustment");
     if (dividendAdjustmentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dividendAdjustmentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dividendAdjustmentIDRef = item.Attributes["id"].Name;
                 DividendAdjustment ob = DividendAdjustment();
                 IDManager.SetID(dividendAdjustmentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dividendAdjustmentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dividendAdjustment = new DividendAdjustment(item);
             }
         }
     }
     
 
 }