public CommodityAmericanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode exercisePeriodNode = xmlNode.SelectSingleNode("exercisePeriod");
     
     if (exercisePeriodNode != null)
     {
         if (exercisePeriodNode.Attributes["href"] != null || exercisePeriodNode.Attributes["id"] != null) 
         {
             if (exercisePeriodNode.Attributes["id"] != null) 
             {
                 exercisePeriodIDRef_ = exercisePeriodNode.Attributes["id"].Value;
                 CommodityExercisePeriods ob = new CommodityExercisePeriods(exercisePeriodNode);
                 IDManager.SetID(exercisePeriodIDRef_, ob);
             }
             else if (exercisePeriodNode.Attributes["href"] != null)
             {
                 exercisePeriodIDRef_ = exercisePeriodNode.Attributes["href"].Value;
             }
             else
             {
                 exercisePeriod_ = new CommodityExercisePeriods(exercisePeriodNode);
             }
         }
         else
         {
             exercisePeriod_ = new CommodityExercisePeriods(exercisePeriodNode);
         }
     }
     
 
     XmlNode exerciseFrequencyNode = xmlNode.SelectSingleNode("exerciseFrequency");
     
     if (exerciseFrequencyNode != null)
     {
         if (exerciseFrequencyNode.Attributes["href"] != null || exerciseFrequencyNode.Attributes["id"] != null) 
         {
             if (exerciseFrequencyNode.Attributes["id"] != null) 
             {
                 exerciseFrequencyIDRef_ = exerciseFrequencyNode.Attributes["id"].Value;
                 Frequency ob = new Frequency(exerciseFrequencyNode);
                 IDManager.SetID(exerciseFrequencyIDRef_, ob);
             }
             else if (exerciseFrequencyNode.Attributes["href"] != null)
             {
                 exerciseFrequencyIDRef_ = exerciseFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 exerciseFrequency_ = new Frequency(exerciseFrequencyNode);
             }
         }
         else
         {
             exerciseFrequency_ = new Frequency(exerciseFrequencyNode);
         }
     }
     
 
     XmlNode latestExerciseTimeNode = xmlNode.SelectSingleNode("latestExerciseTime");
     
     if (latestExerciseTimeNode != null)
     {
         if (latestExerciseTimeNode.Attributes["href"] != null || latestExerciseTimeNode.Attributes["id"] != null) 
         {
             if (latestExerciseTimeNode.Attributes["id"] != null) 
             {
                 latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(latestExerciseTimeNode);
                 IDManager.SetID(latestExerciseTimeIDRef_, ob);
             }
             else if (latestExerciseTimeNode.Attributes["href"] != null)
             {
                 latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["href"].Value;
             }
             else
             {
                 latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
             }
         }
         else
         {
             latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
         }
     }
     
 
     XmlNode latestExerciseTimeDeterminationNode = xmlNode.SelectSingleNode("latestExerciseTimeDetermination");
     
     if (latestExerciseTimeDeterminationNode != null)
     {
         if (latestExerciseTimeDeterminationNode.Attributes["href"] != null || latestExerciseTimeDeterminationNode.Attributes["id"] != null) 
         {
             if (latestExerciseTimeDeterminationNode.Attributes["id"] != null) 
             {
                 latestExerciseTimeDeterminationIDRef_ = latestExerciseTimeDeterminationNode.Attributes["id"].Value;
                 DeterminationMethod ob = new DeterminationMethod(latestExerciseTimeDeterminationNode);
                 IDManager.SetID(latestExerciseTimeDeterminationIDRef_, ob);
             }
             else if (latestExerciseTimeDeterminationNode.Attributes["href"] != null)
             {
                 latestExerciseTimeDeterminationIDRef_ = latestExerciseTimeDeterminationNode.Attributes["href"].Value;
             }
             else
             {
                 latestExerciseTimeDetermination_ = new DeterminationMethod(latestExerciseTimeDeterminationNode);
             }
         }
         else
         {
             latestExerciseTimeDetermination_ = new DeterminationMethod(latestExerciseTimeDeterminationNode);
         }
     }
     
 
     XmlNode expirationTimeNode = xmlNode.SelectSingleNode("expirationTime");
     
     if (expirationTimeNode != null)
     {
         if (expirationTimeNode.Attributes["href"] != null || expirationTimeNode.Attributes["id"] != null) 
         {
             if (expirationTimeNode.Attributes["id"] != null) 
             {
                 expirationTimeIDRef_ = expirationTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(expirationTimeNode);
                 IDManager.SetID(expirationTimeIDRef_, ob);
             }
             else if (expirationTimeNode.Attributes["href"] != null)
             {
                 expirationTimeIDRef_ = expirationTimeNode.Attributes["href"].Value;
             }
             else
             {
                 expirationTime_ = new BusinessCenterTime(expirationTimeNode);
             }
         }
         else
         {
             expirationTime_ = new BusinessCenterTime(expirationTimeNode);
         }
     }
     
 
     XmlNode multipleExerciseNode = xmlNode.SelectSingleNode("multipleExercise");
     
     if (multipleExerciseNode != null)
     {
         if (multipleExerciseNode.Attributes["href"] != null || multipleExerciseNode.Attributes["id"] != null) 
         {
             if (multipleExerciseNode.Attributes["id"] != null) 
             {
                 multipleExerciseIDRef_ = multipleExerciseNode.Attributes["id"].Value;
                 CommodityMultipleExercise ob = new CommodityMultipleExercise(multipleExerciseNode);
                 IDManager.SetID(multipleExerciseIDRef_, ob);
             }
             else if (multipleExerciseNode.Attributes["href"] != null)
             {
                 multipleExerciseIDRef_ = multipleExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 multipleExercise_ = new CommodityMultipleExercise(multipleExerciseNode);
             }
         }
         else
         {
             multipleExercise_ = new CommodityMultipleExercise(multipleExerciseNode);
         }
     }
     
 
 }
Пример #2
0
        public CommodityAmericanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList exercisePeriodNodeList = xmlNode.SelectNodes("exercisePeriod");

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

            foreach (XmlNode item in exercisePeriodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exercisePeriodIDRef = item.Attributes["id"].Name;
                        CommodityExercisePeriods ob = CommodityExercisePeriods();
                        IDManager.SetID(exercisePeriodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exercisePeriodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exercisePeriod = new CommodityExercisePeriods(item);
                    }
                }
            }


            XmlNodeList exerciseFrequencyNodeList = xmlNode.SelectNodes("exerciseFrequency");

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

            foreach (XmlNode item in exerciseFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exerciseFrequencyIDRef = item.Attributes["id"].Name;
                        Frequency ob = Frequency();
                        IDManager.SetID(exerciseFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exerciseFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exerciseFrequency = new Frequency(item);
                    }
                }
            }


            XmlNodeList latestExerciseTimeNodeList = xmlNode.SelectNodes("latestExerciseTime");

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

            foreach (XmlNode item in latestExerciseTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        latestExerciseTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(latestExerciseTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        latestExerciseTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        latestExerciseTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList latestExerciseTimeDeterminationNodeList = xmlNode.SelectNodes("latestExerciseTimeDetermination");

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

            foreach (XmlNode item in latestExerciseTimeDeterminationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        latestExerciseTimeDeterminationIDRef = item.Attributes["id"].Name;
                        DeterminationMethod ob = DeterminationMethod();
                        IDManager.SetID(latestExerciseTimeDeterminationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        latestExerciseTimeDeterminationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        latestExerciseTimeDetermination = new DeterminationMethod(item);
                    }
                }
            }


            XmlNodeList expirationTimeNodeList = xmlNode.SelectNodes("expirationTime");

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

            foreach (XmlNode item in expirationTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        expirationTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(expirationTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        expirationTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        expirationTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList multipleExerciseNodeList = xmlNode.SelectNodes("multipleExercise");

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

            foreach (XmlNode item in multipleExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        multipleExerciseIDRef = item.Attributes["id"].Name;
                        CommodityMultipleExercise ob = CommodityMultipleExercise();
                        IDManager.SetID(multipleExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        multipleExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        multipleExercise = new CommodityMultipleExercise(item);
                    }
                }
            }
        }
 public CommodityAmericanExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList exercisePeriodNodeList = xmlNode.SelectNodes("exercisePeriod");
     if (exercisePeriodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exercisePeriodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exercisePeriodIDRef = item.Attributes["id"].Name;
                 CommodityExercisePeriods ob = CommodityExercisePeriods();
                 IDManager.SetID(exercisePeriodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exercisePeriodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exercisePeriod = new CommodityExercisePeriods(item);
             }
         }
     }
     
 
     XmlNodeList exerciseFrequencyNodeList = xmlNode.SelectNodes("exerciseFrequency");
     if (exerciseFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exerciseFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exerciseFrequencyIDRef = item.Attributes["id"].Name;
                 Frequency ob = Frequency();
                 IDManager.SetID(exerciseFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exerciseFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exerciseFrequency = new Frequency(item);
             }
         }
     }
     
 
     XmlNodeList latestExerciseTimeNodeList = xmlNode.SelectNodes("latestExerciseTime");
     if (latestExerciseTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in latestExerciseTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 latestExerciseTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(latestExerciseTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 latestExerciseTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 latestExerciseTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList latestExerciseTimeDeterminationNodeList = xmlNode.SelectNodes("latestExerciseTimeDetermination");
     if (latestExerciseTimeDeterminationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in latestExerciseTimeDeterminationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 latestExerciseTimeDeterminationIDRef = item.Attributes["id"].Name;
                 DeterminationMethod ob = DeterminationMethod();
                 IDManager.SetID(latestExerciseTimeDeterminationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 latestExerciseTimeDeterminationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 latestExerciseTimeDetermination = new DeterminationMethod(item);
             }
         }
     }
     
 
     XmlNodeList expirationTimeNodeList = xmlNode.SelectNodes("expirationTime");
     if (expirationTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expirationTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expirationTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(expirationTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expirationTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expirationTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList multipleExerciseNodeList = xmlNode.SelectNodes("multipleExercise");
     if (multipleExerciseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in multipleExerciseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 multipleExerciseIDRef = item.Attributes["id"].Name;
                 CommodityMultipleExercise ob = CommodityMultipleExercise();
                 IDManager.SetID(multipleExerciseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 multipleExerciseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 multipleExercise = new CommodityMultipleExercise(item);
             }
         }
     }
     
 
 }
Пример #4
0
        public CommodityAmericanExercise(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode exercisePeriodNode = xmlNode.SelectSingleNode("exercisePeriod");

            if (exercisePeriodNode != null)
            {
                if (exercisePeriodNode.Attributes["href"] != null || exercisePeriodNode.Attributes["id"] != null)
                {
                    if (exercisePeriodNode.Attributes["id"] != null)
                    {
                        exercisePeriodIDRef_ = exercisePeriodNode.Attributes["id"].Value;
                        CommodityExercisePeriods ob = new CommodityExercisePeriods(exercisePeriodNode);
                        IDManager.SetID(exercisePeriodIDRef_, ob);
                    }
                    else if (exercisePeriodNode.Attributes["href"] != null)
                    {
                        exercisePeriodIDRef_ = exercisePeriodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exercisePeriod_ = new CommodityExercisePeriods(exercisePeriodNode);
                    }
                }
                else
                {
                    exercisePeriod_ = new CommodityExercisePeriods(exercisePeriodNode);
                }
            }


            XmlNode exerciseFrequencyNode = xmlNode.SelectSingleNode("exerciseFrequency");

            if (exerciseFrequencyNode != null)
            {
                if (exerciseFrequencyNode.Attributes["href"] != null || exerciseFrequencyNode.Attributes["id"] != null)
                {
                    if (exerciseFrequencyNode.Attributes["id"] != null)
                    {
                        exerciseFrequencyIDRef_ = exerciseFrequencyNode.Attributes["id"].Value;
                        Frequency ob = new Frequency(exerciseFrequencyNode);
                        IDManager.SetID(exerciseFrequencyIDRef_, ob);
                    }
                    else if (exerciseFrequencyNode.Attributes["href"] != null)
                    {
                        exerciseFrequencyIDRef_ = exerciseFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exerciseFrequency_ = new Frequency(exerciseFrequencyNode);
                    }
                }
                else
                {
                    exerciseFrequency_ = new Frequency(exerciseFrequencyNode);
                }
            }


            XmlNode latestExerciseTimeNode = xmlNode.SelectSingleNode("latestExerciseTime");

            if (latestExerciseTimeNode != null)
            {
                if (latestExerciseTimeNode.Attributes["href"] != null || latestExerciseTimeNode.Attributes["id"] != null)
                {
                    if (latestExerciseTimeNode.Attributes["id"] != null)
                    {
                        latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(latestExerciseTimeNode);
                        IDManager.SetID(latestExerciseTimeIDRef_, ob);
                    }
                    else if (latestExerciseTimeNode.Attributes["href"] != null)
                    {
                        latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
                    }
                }
                else
                {
                    latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode);
                }
            }


            XmlNode latestExerciseTimeDeterminationNode = xmlNode.SelectSingleNode("latestExerciseTimeDetermination");

            if (latestExerciseTimeDeterminationNode != null)
            {
                if (latestExerciseTimeDeterminationNode.Attributes["href"] != null || latestExerciseTimeDeterminationNode.Attributes["id"] != null)
                {
                    if (latestExerciseTimeDeterminationNode.Attributes["id"] != null)
                    {
                        latestExerciseTimeDeterminationIDRef_ = latestExerciseTimeDeterminationNode.Attributes["id"].Value;
                        DeterminationMethod ob = new DeterminationMethod(latestExerciseTimeDeterminationNode);
                        IDManager.SetID(latestExerciseTimeDeterminationIDRef_, ob);
                    }
                    else if (latestExerciseTimeDeterminationNode.Attributes["href"] != null)
                    {
                        latestExerciseTimeDeterminationIDRef_ = latestExerciseTimeDeterminationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        latestExerciseTimeDetermination_ = new DeterminationMethod(latestExerciseTimeDeterminationNode);
                    }
                }
                else
                {
                    latestExerciseTimeDetermination_ = new DeterminationMethod(latestExerciseTimeDeterminationNode);
                }
            }


            XmlNode expirationTimeNode = xmlNode.SelectSingleNode("expirationTime");

            if (expirationTimeNode != null)
            {
                if (expirationTimeNode.Attributes["href"] != null || expirationTimeNode.Attributes["id"] != null)
                {
                    if (expirationTimeNode.Attributes["id"] != null)
                    {
                        expirationTimeIDRef_ = expirationTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(expirationTimeNode);
                        IDManager.SetID(expirationTimeIDRef_, ob);
                    }
                    else if (expirationTimeNode.Attributes["href"] != null)
                    {
                        expirationTimeIDRef_ = expirationTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        expirationTime_ = new BusinessCenterTime(expirationTimeNode);
                    }
                }
                else
                {
                    expirationTime_ = new BusinessCenterTime(expirationTimeNode);
                }
            }


            XmlNode multipleExerciseNode = xmlNode.SelectSingleNode("multipleExercise");

            if (multipleExerciseNode != null)
            {
                if (multipleExerciseNode.Attributes["href"] != null || multipleExerciseNode.Attributes["id"] != null)
                {
                    if (multipleExerciseNode.Attributes["id"] != null)
                    {
                        multipleExerciseIDRef_ = multipleExerciseNode.Attributes["id"].Value;
                        CommodityMultipleExercise ob = new CommodityMultipleExercise(multipleExerciseNode);
                        IDManager.SetID(multipleExerciseIDRef_, ob);
                    }
                    else if (multipleExerciseNode.Attributes["href"] != null)
                    {
                        multipleExerciseIDRef_ = multipleExerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        multipleExercise_ = new CommodityMultipleExercise(multipleExerciseNode);
                    }
                }
                else
                {
                    multipleExercise_ = new CommodityMultipleExercise(multipleExerciseNode);
                }
            }
        }