public ResetFrequency(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode weeklyRollConventionNode = xmlNode.SelectSingleNode("weeklyRollConvention");

            if (weeklyRollConventionNode != null)
            {
                if (weeklyRollConventionNode.Attributes["href"] != null || weeklyRollConventionNode.Attributes["id"] != null)
                {
                    if (weeklyRollConventionNode.Attributes["id"] != null)
                    {
                        weeklyRollConventionIDRef_ = weeklyRollConventionNode.Attributes["id"].Value;
                        WeeklyRollConventionEnum ob = new WeeklyRollConventionEnum(weeklyRollConventionNode);
                        IDManager.SetID(weeklyRollConventionIDRef_, ob);
                    }
                    else if (weeklyRollConventionNode.Attributes["href"] != null)
                    {
                        weeklyRollConventionIDRef_ = weeklyRollConventionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        weeklyRollConvention_ = new WeeklyRollConventionEnum(weeklyRollConventionNode);
                    }
                }
                else
                {
                    weeklyRollConvention_ = new WeeklyRollConventionEnum(weeklyRollConventionNode);
                }
            }
        }
 public ResetFrequency(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode weeklyRollConventionNode = xmlNode.SelectSingleNode("weeklyRollConvention");
     
     if (weeklyRollConventionNode != null)
     {
         if (weeklyRollConventionNode.Attributes["href"] != null || weeklyRollConventionNode.Attributes["id"] != null) 
         {
             if (weeklyRollConventionNode.Attributes["id"] != null) 
             {
                 weeklyRollConventionIDRef_ = weeklyRollConventionNode.Attributes["id"].Value;
                 WeeklyRollConventionEnum ob = new WeeklyRollConventionEnum(weeklyRollConventionNode);
                 IDManager.SetID(weeklyRollConventionIDRef_, ob);
             }
             else if (weeklyRollConventionNode.Attributes["href"] != null)
             {
                 weeklyRollConventionIDRef_ = weeklyRollConventionNode.Attributes["href"].Value;
             }
             else
             {
                 weeklyRollConvention_ = new WeeklyRollConventionEnum(weeklyRollConventionNode);
             }
         }
         else
         {
             weeklyRollConvention_ = new WeeklyRollConventionEnum(weeklyRollConventionNode);
         }
     }
     
 
 }
Beispiel #3
0
        public ResetFrequency(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList weeklyRollConventionNodeList = xmlNode.SelectNodes("weeklyRollConvention");

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

            foreach (XmlNode item in weeklyRollConventionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        weeklyRollConventionIDRef = item.Attributes["id"].Name;
                        WeeklyRollConventionEnum ob = WeeklyRollConventionEnum();
                        IDManager.SetID(weeklyRollConventionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        weeklyRollConventionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        weeklyRollConvention = new WeeklyRollConventionEnum(item);
                    }
                }
            }
        }