public Period(XmlNode xmlNode)
        {
            XmlNodeList periodMultiplierNodeList = xmlNode.SelectNodes("periodMultiplier");

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

            foreach (XmlNode item in periodMultiplierNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        periodMultiplierIDRef = item.Attributes["id"].Name;
                        XsdTypeInteger ob = XsdTypeInteger();
                        IDManager.SetID(periodMultiplierIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        periodMultiplierIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        periodMultiplier = new XsdTypeInteger(item);
                    }
                }
            }


            XmlNodeList periodNodeList = xmlNode.SelectNodes("period");

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

            foreach (XmlNode item in periodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        periodIDRef = item.Attributes["id"].Name;
                        PeriodEnum ob = PeriodEnum();
                        IDManager.SetID(periodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        periodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        period = new PeriodEnum(item);
                    }
                }
            }
        }
 public Period(XmlNode xmlNode)
 {
     XmlNode periodMultiplierNode = xmlNode.SelectSingleNode("periodMultiplier");
     
     if (periodMultiplierNode != null)
     {
         if (periodMultiplierNode.Attributes["href"] != null || periodMultiplierNode.Attributes["id"] != null) 
         {
             if (periodMultiplierNode.Attributes["id"] != null) 
             {
                 periodMultiplierIDRef_ = periodMultiplierNode.Attributes["id"].Value;
                 XsdTypeInteger ob = new XsdTypeInteger(periodMultiplierNode);
                 IDManager.SetID(periodMultiplierIDRef_, ob);
             }
             else if (periodMultiplierNode.Attributes["href"] != null)
             {
                 periodMultiplierIDRef_ = periodMultiplierNode.Attributes["href"].Value;
             }
             else
             {
                 periodMultiplier_ = new XsdTypeInteger(periodMultiplierNode);
             }
         }
         else
         {
             periodMultiplier_ = new XsdTypeInteger(periodMultiplierNode);
         }
     }
     
 
     XmlNode periodNode = xmlNode.SelectSingleNode("period");
     
     if (periodNode != null)
     {
         if (periodNode.Attributes["href"] != null || periodNode.Attributes["id"] != null) 
         {
             if (periodNode.Attributes["id"] != null) 
             {
                 periodIDRef_ = periodNode.Attributes["id"].Value;
                 PeriodEnum ob = new PeriodEnum(periodNode);
                 IDManager.SetID(periodIDRef_, ob);
             }
             else if (periodNode.Attributes["href"] != null)
             {
                 periodIDRef_ = periodNode.Attributes["href"].Value;
             }
             else
             {
                 period_ = new PeriodEnum(periodNode);
             }
         }
         else
         {
             period_ = new PeriodEnum(periodNode);
         }
     }
     
 
 }
Пример #3
0
        public Period(XmlNode xmlNode)
        {
            XmlNode periodMultiplierNode = xmlNode.SelectSingleNode("periodMultiplier");

            if (periodMultiplierNode != null)
            {
                if (periodMultiplierNode.Attributes["href"] != null || periodMultiplierNode.Attributes["id"] != null)
                {
                    if (periodMultiplierNode.Attributes["id"] != null)
                    {
                        periodMultiplierIDRef_ = periodMultiplierNode.Attributes["id"].Value;
                        XsdTypeInteger ob = new XsdTypeInteger(periodMultiplierNode);
                        IDManager.SetID(periodMultiplierIDRef_, ob);
                    }
                    else if (periodMultiplierNode.Attributes["href"] != null)
                    {
                        periodMultiplierIDRef_ = periodMultiplierNode.Attributes["href"].Value;
                    }
                    else
                    {
                        periodMultiplier_ = new XsdTypeInteger(periodMultiplierNode);
                    }
                }
                else
                {
                    periodMultiplier_ = new XsdTypeInteger(periodMultiplierNode);
                }
            }


            XmlNode periodNode = xmlNode.SelectSingleNode("period");

            if (periodNode != null)
            {
                if (periodNode.Attributes["href"] != null || periodNode.Attributes["id"] != null)
                {
                    if (periodNode.Attributes["id"] != null)
                    {
                        periodIDRef_ = periodNode.Attributes["id"].Value;
                        PeriodEnum ob = new PeriodEnum(periodNode);
                        IDManager.SetID(periodIDRef_, ob);
                    }
                    else if (periodNode.Attributes["href"] != null)
                    {
                        periodIDRef_ = periodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        period_ = new PeriodEnum(periodNode);
                    }
                }
                else
                {
                    period_ = new PeriodEnum(periodNode);
                }
            }
        }