public WeightedPartialDerivative(XmlNode xmlNode)
 {
     XmlNode partialDerivativeReferenceNode = xmlNode.SelectSingleNode("partialDerivativeReference");
     
     if (partialDerivativeReferenceNode != null)
     {
         if (partialDerivativeReferenceNode.Attributes["href"] != null || partialDerivativeReferenceNode.Attributes["id"] != null) 
         {
             if (partialDerivativeReferenceNode.Attributes["id"] != null) 
             {
                 partialDerivativeReferenceIDRef_ = partialDerivativeReferenceNode.Attributes["id"].Value;
                 PricingParameterDerivativeReference ob = new PricingParameterDerivativeReference(partialDerivativeReferenceNode);
                 IDManager.SetID(partialDerivativeReferenceIDRef_, ob);
             }
             else if (partialDerivativeReferenceNode.Attributes["href"] != null)
             {
                 partialDerivativeReferenceIDRef_ = partialDerivativeReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 partialDerivativeReference_ = new PricingParameterDerivativeReference(partialDerivativeReferenceNode);
             }
         }
         else
         {
             partialDerivativeReference_ = new PricingParameterDerivativeReference(partialDerivativeReferenceNode);
         }
     }
     
 
     XmlNode weightNode = xmlNode.SelectSingleNode("weight");
     
     if (weightNode != null)
     {
         if (weightNode.Attributes["href"] != null || weightNode.Attributes["id"] != null) 
         {
             if (weightNode.Attributes["id"] != null) 
             {
                 weightIDRef_ = weightNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(weightNode);
                 IDManager.SetID(weightIDRef_, ob);
             }
             else if (weightNode.Attributes["href"] != null)
             {
                 weightIDRef_ = weightNode.Attributes["href"].Value;
             }
             else
             {
                 weight_ = new XsdTypeDecimal(weightNode);
             }
         }
         else
         {
             weight_ = new XsdTypeDecimal(weightNode);
         }
     }
     
 
 }
 public WeightedPartialDerivative(XmlNode xmlNode)
 {
     XmlNodeList partialDerivativeReferenceNodeList = xmlNode.SelectNodes("partialDerivativeReference");
     if (partialDerivativeReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in partialDerivativeReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partialDerivativeReferenceIDRef = item.Attributes["id"].Name;
                 PricingParameterDerivativeReference ob = PricingParameterDerivativeReference();
                 IDManager.SetID(partialDerivativeReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partialDerivativeReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 partialDerivativeReference = new PricingParameterDerivativeReference(item);
             }
         }
     }
     
 
     XmlNodeList weightNodeList = xmlNode.SelectNodes("weight");
     if (weightNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in weightNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 weightIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(weightIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 weightIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 weight = new XsdTypeDecimal(item);
             }
         }
     }
     
 
 }
        public WeightedPartialDerivative(XmlNode xmlNode)
        {
            XmlNodeList partialDerivativeReferenceNodeList = xmlNode.SelectNodes("partialDerivativeReference");

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

            foreach (XmlNode item in partialDerivativeReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        partialDerivativeReferenceIDRef = item.Attributes["id"].Name;
                        PricingParameterDerivativeReference ob = PricingParameterDerivativeReference();
                        IDManager.SetID(partialDerivativeReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        partialDerivativeReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        partialDerivativeReference = new PricingParameterDerivativeReference(item);
                    }
                }
            }


            XmlNodeList weightNodeList = xmlNode.SelectNodes("weight");

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

            foreach (XmlNode item in weightNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        weightIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(weightIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        weightIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        weight = new XsdTypeDecimal(item);
                    }
                }
            }
        }
Exemplo n.º 4
0
        public WeightedPartialDerivative(XmlNode xmlNode)
        {
            XmlNode partialDerivativeReferenceNode = xmlNode.SelectSingleNode("partialDerivativeReference");

            if (partialDerivativeReferenceNode != null)
            {
                if (partialDerivativeReferenceNode.Attributes["href"] != null || partialDerivativeReferenceNode.Attributes["id"] != null)
                {
                    if (partialDerivativeReferenceNode.Attributes["id"] != null)
                    {
                        partialDerivativeReferenceIDRef_ = partialDerivativeReferenceNode.Attributes["id"].Value;
                        PricingParameterDerivativeReference ob = new PricingParameterDerivativeReference(partialDerivativeReferenceNode);
                        IDManager.SetID(partialDerivativeReferenceIDRef_, ob);
                    }
                    else if (partialDerivativeReferenceNode.Attributes["href"] != null)
                    {
                        partialDerivativeReferenceIDRef_ = partialDerivativeReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        partialDerivativeReference_ = new PricingParameterDerivativeReference(partialDerivativeReferenceNode);
                    }
                }
                else
                {
                    partialDerivativeReference_ = new PricingParameterDerivativeReference(partialDerivativeReferenceNode);
                }
            }


            XmlNode weightNode = xmlNode.SelectSingleNode("weight");

            if (weightNode != null)
            {
                if (weightNode.Attributes["href"] != null || weightNode.Attributes["id"] != null)
                {
                    if (weightNode.Attributes["id"] != null)
                    {
                        weightIDRef_ = weightNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(weightNode);
                        IDManager.SetID(weightIDRef_, ob);
                    }
                    else if (weightNode.Attributes["href"] != null)
                    {
                        weightIDRef_ = weightNode.Attributes["href"].Value;
                    }
                    else
                    {
                        weight_ = new XsdTypeDecimal(weightNode);
                    }
                }
                else
                {
                    weight_ = new XsdTypeDecimal(weightNode);
                }
            }
        }