public GasPhysicalLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList deliveryPeriodsNodeList = xmlNode.SelectNodes("deliveryPeriods");
     if (deliveryPeriodsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryPeriodsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryPeriodsIDRef = item.Attributes["id"].Name;
                 GasDeliveryPeriods ob = GasDeliveryPeriods();
                 IDManager.SetID(deliveryPeriodsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryPeriodsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryPeriods = new GasDeliveryPeriods(item);
             }
         }
     }
     
 
     XmlNodeList gasNodeList = xmlNode.SelectNodes("gas");
     if (gasNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in gasNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 gasIDRef = item.Attributes["id"].Name;
                 GasProduct ob = GasProduct();
                 IDManager.SetID(gasIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 gasIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 gas = new GasProduct(item);
             }
         }
     }
     
 
     XmlNodeList deliveryConditionsNodeList = xmlNode.SelectNodes("deliveryConditions");
     if (deliveryConditionsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryConditionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryConditionsIDRef = item.Attributes["id"].Name;
                 GasDelivery ob = GasDelivery();
                 IDManager.SetID(deliveryConditionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryConditionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryConditions = new GasDelivery(item);
             }
         }
     }
     
 
     XmlNodeList deliveryQuantityNodeList = xmlNode.SelectNodes("deliveryQuantity");
     if (deliveryQuantityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryQuantityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryQuantityIDRef = item.Attributes["id"].Name;
                 GasPhysicalQuantity ob = GasPhysicalQuantity();
                 IDManager.SetID(deliveryQuantityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryQuantityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryQuantity = new GasPhysicalQuantity(item);
             }
         }
     }
     
 
 }
 public GasPhysicalLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode deliveryPeriodsNode = xmlNode.SelectSingleNode("deliveryPeriods");
     
     if (deliveryPeriodsNode != null)
     {
         if (deliveryPeriodsNode.Attributes["href"] != null || deliveryPeriodsNode.Attributes["id"] != null) 
         {
             if (deliveryPeriodsNode.Attributes["id"] != null) 
             {
                 deliveryPeriodsIDRef_ = deliveryPeriodsNode.Attributes["id"].Value;
                 GasDeliveryPeriods ob = new GasDeliveryPeriods(deliveryPeriodsNode);
                 IDManager.SetID(deliveryPeriodsIDRef_, ob);
             }
             else if (deliveryPeriodsNode.Attributes["href"] != null)
             {
                 deliveryPeriodsIDRef_ = deliveryPeriodsNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryPeriods_ = new GasDeliveryPeriods(deliveryPeriodsNode);
             }
         }
         else
         {
             deliveryPeriods_ = new GasDeliveryPeriods(deliveryPeriodsNode);
         }
     }
     
 
     XmlNode gasNode = xmlNode.SelectSingleNode("gas");
     
     if (gasNode != null)
     {
         if (gasNode.Attributes["href"] != null || gasNode.Attributes["id"] != null) 
         {
             if (gasNode.Attributes["id"] != null) 
             {
                 gasIDRef_ = gasNode.Attributes["id"].Value;
                 GasProduct ob = new GasProduct(gasNode);
                 IDManager.SetID(gasIDRef_, ob);
             }
             else if (gasNode.Attributes["href"] != null)
             {
                 gasIDRef_ = gasNode.Attributes["href"].Value;
             }
             else
             {
                 gas_ = new GasProduct(gasNode);
             }
         }
         else
         {
             gas_ = new GasProduct(gasNode);
         }
     }
     
 
     XmlNode deliveryConditionsNode = xmlNode.SelectSingleNode("deliveryConditions");
     
     if (deliveryConditionsNode != null)
     {
         if (deliveryConditionsNode.Attributes["href"] != null || deliveryConditionsNode.Attributes["id"] != null) 
         {
             if (deliveryConditionsNode.Attributes["id"] != null) 
             {
                 deliveryConditionsIDRef_ = deliveryConditionsNode.Attributes["id"].Value;
                 GasDelivery ob = new GasDelivery(deliveryConditionsNode);
                 IDManager.SetID(deliveryConditionsIDRef_, ob);
             }
             else if (deliveryConditionsNode.Attributes["href"] != null)
             {
                 deliveryConditionsIDRef_ = deliveryConditionsNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryConditions_ = new GasDelivery(deliveryConditionsNode);
             }
         }
         else
         {
             deliveryConditions_ = new GasDelivery(deliveryConditionsNode);
         }
     }
     
 
     XmlNode deliveryQuantityNode = xmlNode.SelectSingleNode("deliveryQuantity");
     
     if (deliveryQuantityNode != null)
     {
         if (deliveryQuantityNode.Attributes["href"] != null || deliveryQuantityNode.Attributes["id"] != null) 
         {
             if (deliveryQuantityNode.Attributes["id"] != null) 
             {
                 deliveryQuantityIDRef_ = deliveryQuantityNode.Attributes["id"].Value;
                 GasPhysicalQuantity ob = new GasPhysicalQuantity(deliveryQuantityNode);
                 IDManager.SetID(deliveryQuantityIDRef_, ob);
             }
             else if (deliveryQuantityNode.Attributes["href"] != null)
             {
                 deliveryQuantityIDRef_ = deliveryQuantityNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryQuantity_ = new GasPhysicalQuantity(deliveryQuantityNode);
             }
         }
         else
         {
             deliveryQuantity_ = new GasPhysicalQuantity(deliveryQuantityNode);
         }
     }
     
 
 }
        public GasPhysicalLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode deliveryPeriodsNode = xmlNode.SelectSingleNode("deliveryPeriods");

            if (deliveryPeriodsNode != null)
            {
                if (deliveryPeriodsNode.Attributes["href"] != null || deliveryPeriodsNode.Attributes["id"] != null)
                {
                    if (deliveryPeriodsNode.Attributes["id"] != null)
                    {
                        deliveryPeriodsIDRef_ = deliveryPeriodsNode.Attributes["id"].Value;
                        GasDeliveryPeriods ob = new GasDeliveryPeriods(deliveryPeriodsNode);
                        IDManager.SetID(deliveryPeriodsIDRef_, ob);
                    }
                    else if (deliveryPeriodsNode.Attributes["href"] != null)
                    {
                        deliveryPeriodsIDRef_ = deliveryPeriodsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryPeriods_ = new GasDeliveryPeriods(deliveryPeriodsNode);
                    }
                }
                else
                {
                    deliveryPeriods_ = new GasDeliveryPeriods(deliveryPeriodsNode);
                }
            }


            XmlNode gasNode = xmlNode.SelectSingleNode("gas");

            if (gasNode != null)
            {
                if (gasNode.Attributes["href"] != null || gasNode.Attributes["id"] != null)
                {
                    if (gasNode.Attributes["id"] != null)
                    {
                        gasIDRef_ = gasNode.Attributes["id"].Value;
                        GasProduct ob = new GasProduct(gasNode);
                        IDManager.SetID(gasIDRef_, ob);
                    }
                    else if (gasNode.Attributes["href"] != null)
                    {
                        gasIDRef_ = gasNode.Attributes["href"].Value;
                    }
                    else
                    {
                        gas_ = new GasProduct(gasNode);
                    }
                }
                else
                {
                    gas_ = new GasProduct(gasNode);
                }
            }


            XmlNode deliveryConditionsNode = xmlNode.SelectSingleNode("deliveryConditions");

            if (deliveryConditionsNode != null)
            {
                if (deliveryConditionsNode.Attributes["href"] != null || deliveryConditionsNode.Attributes["id"] != null)
                {
                    if (deliveryConditionsNode.Attributes["id"] != null)
                    {
                        deliveryConditionsIDRef_ = deliveryConditionsNode.Attributes["id"].Value;
                        GasDelivery ob = new GasDelivery(deliveryConditionsNode);
                        IDManager.SetID(deliveryConditionsIDRef_, ob);
                    }
                    else if (deliveryConditionsNode.Attributes["href"] != null)
                    {
                        deliveryConditionsIDRef_ = deliveryConditionsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryConditions_ = new GasDelivery(deliveryConditionsNode);
                    }
                }
                else
                {
                    deliveryConditions_ = new GasDelivery(deliveryConditionsNode);
                }
            }


            XmlNode deliveryQuantityNode = xmlNode.SelectSingleNode("deliveryQuantity");

            if (deliveryQuantityNode != null)
            {
                if (deliveryQuantityNode.Attributes["href"] != null || deliveryQuantityNode.Attributes["id"] != null)
                {
                    if (deliveryQuantityNode.Attributes["id"] != null)
                    {
                        deliveryQuantityIDRef_ = deliveryQuantityNode.Attributes["id"].Value;
                        GasPhysicalQuantity ob = new GasPhysicalQuantity(deliveryQuantityNode);
                        IDManager.SetID(deliveryQuantityIDRef_, ob);
                    }
                    else if (deliveryQuantityNode.Attributes["href"] != null)
                    {
                        deliveryQuantityIDRef_ = deliveryQuantityNode.Attributes["href"].Value;
                    }
                    else
                    {
                        deliveryQuantity_ = new GasPhysicalQuantity(deliveryQuantityNode);
                    }
                }
                else
                {
                    deliveryQuantity_ = new GasPhysicalQuantity(deliveryQuantityNode);
                }
            }
        }
Пример #4
0
        public GasPhysicalLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList deliveryPeriodsNodeList = xmlNode.SelectNodes("deliveryPeriods");

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

            foreach (XmlNode item in deliveryPeriodsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryPeriodsIDRef = item.Attributes["id"].Name;
                        GasDeliveryPeriods ob = GasDeliveryPeriods();
                        IDManager.SetID(deliveryPeriodsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryPeriodsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryPeriods = new GasDeliveryPeriods(item);
                    }
                }
            }


            XmlNodeList gasNodeList = xmlNode.SelectNodes("gas");

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

            foreach (XmlNode item in gasNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        gasIDRef = item.Attributes["id"].Name;
                        GasProduct ob = GasProduct();
                        IDManager.SetID(gasIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        gasIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        gas = new GasProduct(item);
                    }
                }
            }


            XmlNodeList deliveryConditionsNodeList = xmlNode.SelectNodes("deliveryConditions");

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

            foreach (XmlNode item in deliveryConditionsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryConditionsIDRef = item.Attributes["id"].Name;
                        GasDelivery ob = GasDelivery();
                        IDManager.SetID(deliveryConditionsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryConditionsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryConditions = new GasDelivery(item);
                    }
                }
            }


            XmlNodeList deliveryQuantityNodeList = xmlNode.SelectNodes("deliveryQuantity");

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

            foreach (XmlNode item in deliveryQuantityNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        deliveryQuantityIDRef = item.Attributes["id"].Name;
                        GasPhysicalQuantity ob = GasPhysicalQuantity();
                        IDManager.SetID(deliveryQuantityIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        deliveryQuantityIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        deliveryQuantity = new GasPhysicalQuantity(item);
                    }
                }
            }
        }