public TriggerEvent(XmlNode xmlNode)
        {
            XmlNodeList scheduleNodeList = xmlNode.SelectNodes("schedule");

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


            XmlNode triggerDatesNode = xmlNode.SelectSingleNode("triggerDates");

            if (triggerDatesNode != null)
            {
                if (triggerDatesNode.Attributes["href"] != null || triggerDatesNode.Attributes["id"] != null)
                {
                    if (triggerDatesNode.Attributes["id"] != null)
                    {
                        triggerDatesIDRef_ = triggerDatesNode.Attributes["id"].Value;
                        DateList ob = new DateList(triggerDatesNode);
                        IDManager.SetID(triggerDatesIDRef_, ob);
                    }
                    else if (triggerDatesNode.Attributes["href"] != null)
                    {
                        triggerDatesIDRef_ = triggerDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        triggerDates_ = new DateList(triggerDatesNode);
                    }
                }
                else
                {
                    triggerDates_ = new DateList(triggerDatesNode);
                }
            }


            XmlNode triggerNode = xmlNode.SelectSingleNode("trigger");

            if (triggerNode != null)
            {
                if (triggerNode.Attributes["href"] != null || triggerNode.Attributes["id"] != null)
                {
                    if (triggerNode.Attributes["id"] != null)
                    {
                        triggerIDRef_ = triggerNode.Attributes["id"].Value;
                        Trigger ob = new Trigger(triggerNode);
                        IDManager.SetID(triggerIDRef_, ob);
                    }
                    else if (triggerNode.Attributes["href"] != null)
                    {
                        triggerIDRef_ = triggerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        trigger_ = new Trigger(triggerNode);
                    }
                }
                else
                {
                    trigger_ = new Trigger(triggerNode);
                }
            }


            XmlNode featurePaymentNode = xmlNode.SelectSingleNode("featurePayment");

            if (featurePaymentNode != null)
            {
                if (featurePaymentNode.Attributes["href"] != null || featurePaymentNode.Attributes["id"] != null)
                {
                    if (featurePaymentNode.Attributes["id"] != null)
                    {
                        featurePaymentIDRef_ = featurePaymentNode.Attributes["id"].Value;
                        FeaturePayment ob = new FeaturePayment(featurePaymentNode);
                        IDManager.SetID(featurePaymentIDRef_, ob);
                    }
                    else if (featurePaymentNode.Attributes["href"] != null)
                    {
                        featurePaymentIDRef_ = featurePaymentNode.Attributes["href"].Value;
                    }
                    else
                    {
                        featurePayment_ = new FeaturePayment(featurePaymentNode);
                    }
                }
                else
                {
                    featurePayment_ = new FeaturePayment(featurePaymentNode);
                }
            }
        }
        public TriggerEvent(XmlNode xmlNode)
        {
            XmlNodeList scheduleNodeList = xmlNode.SelectNodes("schedule");

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


            XmlNodeList triggerDatesNodeList = xmlNode.SelectNodes("triggerDates");

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

            foreach (XmlNode item in triggerDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        triggerDatesIDRef = item.Attributes["id"].Name;
                        DateList ob = DateList();
                        IDManager.SetID(triggerDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        triggerDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        triggerDates = new DateList(item);
                    }
                }
            }


            XmlNodeList triggerNodeList = xmlNode.SelectNodes("trigger");

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

            foreach (XmlNode item in triggerNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        triggerIDRef = item.Attributes["id"].Name;
                        Trigger ob = Trigger();
                        IDManager.SetID(triggerIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        triggerIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        trigger = new Trigger(item);
                    }
                }
            }


            XmlNodeList featurePaymentNodeList = xmlNode.SelectNodes("featurePayment");

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

            foreach (XmlNode item in featurePaymentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        featurePaymentIDRef = item.Attributes["id"].Name;
                        FeaturePayment ob = FeaturePayment();
                        IDManager.SetID(featurePaymentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        featurePaymentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        featurePayment = new FeaturePayment(item);
                    }
                }
            }
        }
 public TriggerEvent(XmlNode xmlNode)
 {
     XmlNodeList scheduleNodeList = xmlNode.SelectNodes("schedule");
     
     if (scheduleNodeList != null)
     {
         this.schedule_ = new List<AveragingSchedule>();
         foreach (XmlNode item in scheduleNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     scheduleIDRef_ = item.Attributes["id"].Value;
                     schedule_.Add(new AveragingSchedule(item));
                     IDManager.SetID(scheduleIDRef_, schedule_[schedule_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     scheduleIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 schedule_.Add(new AveragingSchedule(item));
                 }
             }
             else
             {
                 schedule_.Add(new AveragingSchedule(item));
             }
         }
     }
     
 
     XmlNode triggerDatesNode = xmlNode.SelectSingleNode("triggerDates");
     
     if (triggerDatesNode != null)
     {
         if (triggerDatesNode.Attributes["href"] != null || triggerDatesNode.Attributes["id"] != null) 
         {
             if (triggerDatesNode.Attributes["id"] != null) 
             {
                 triggerDatesIDRef_ = triggerDatesNode.Attributes["id"].Value;
                 DateList ob = new DateList(triggerDatesNode);
                 IDManager.SetID(triggerDatesIDRef_, ob);
             }
             else if (triggerDatesNode.Attributes["href"] != null)
             {
                 triggerDatesIDRef_ = triggerDatesNode.Attributes["href"].Value;
             }
             else
             {
                 triggerDates_ = new DateList(triggerDatesNode);
             }
         }
         else
         {
             triggerDates_ = new DateList(triggerDatesNode);
         }
     }
     
 
     XmlNode triggerNode = xmlNode.SelectSingleNode("trigger");
     
     if (triggerNode != null)
     {
         if (triggerNode.Attributes["href"] != null || triggerNode.Attributes["id"] != null) 
         {
             if (triggerNode.Attributes["id"] != null) 
             {
                 triggerIDRef_ = triggerNode.Attributes["id"].Value;
                 Trigger ob = new Trigger(triggerNode);
                 IDManager.SetID(triggerIDRef_, ob);
             }
             else if (triggerNode.Attributes["href"] != null)
             {
                 triggerIDRef_ = triggerNode.Attributes["href"].Value;
             }
             else
             {
                 trigger_ = new Trigger(triggerNode);
             }
         }
         else
         {
             trigger_ = new Trigger(triggerNode);
         }
     }
     
 
     XmlNode featurePaymentNode = xmlNode.SelectSingleNode("featurePayment");
     
     if (featurePaymentNode != null)
     {
         if (featurePaymentNode.Attributes["href"] != null || featurePaymentNode.Attributes["id"] != null) 
         {
             if (featurePaymentNode.Attributes["id"] != null) 
             {
                 featurePaymentIDRef_ = featurePaymentNode.Attributes["id"].Value;
                 FeaturePayment ob = new FeaturePayment(featurePaymentNode);
                 IDManager.SetID(featurePaymentIDRef_, ob);
             }
             else if (featurePaymentNode.Attributes["href"] != null)
             {
                 featurePaymentIDRef_ = featurePaymentNode.Attributes["href"].Value;
             }
             else
             {
                 featurePayment_ = new FeaturePayment(featurePaymentNode);
             }
         }
         else
         {
             featurePayment_ = new FeaturePayment(featurePaymentNode);
         }
     }
     
 
 }
 public TriggerEvent(XmlNode xmlNode)
 {
     XmlNodeList scheduleNodeList = xmlNode.SelectNodes("schedule");
     
     foreach (XmlNode item in scheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 scheduleIDRef = item.Attributes["id"].Name;
                 List<AveragingSchedule> ob = new List<AveragingSchedule>();
                 ob.Add(new AveragingSchedule(item));
                 IDManager.SetID(scheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 scheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
             schedule.Add(new AveragingSchedule(item));
             }
         }
     }
     
 
     XmlNodeList triggerDatesNodeList = xmlNode.SelectNodes("triggerDates");
     if (triggerDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in triggerDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 triggerDatesIDRef = item.Attributes["id"].Name;
                 DateList ob = DateList();
                 IDManager.SetID(triggerDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 triggerDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 triggerDates = new DateList(item);
             }
         }
     }
     
 
     XmlNodeList triggerNodeList = xmlNode.SelectNodes("trigger");
     if (triggerNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in triggerNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 triggerIDRef = item.Attributes["id"].Name;
                 Trigger ob = Trigger();
                 IDManager.SetID(triggerIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 triggerIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 trigger = new Trigger(item);
             }
         }
     }
     
 
     XmlNodeList featurePaymentNodeList = xmlNode.SelectNodes("featurePayment");
     if (featurePaymentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in featurePaymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 featurePaymentIDRef = item.Attributes["id"].Name;
                 FeaturePayment ob = FeaturePayment();
                 IDManager.SetID(featurePaymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 featurePaymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 featurePayment = new FeaturePayment(item);
             }
         }
     }
     
 
 }