public SensitivitySetDefinition(XmlNode xmlNode)
        {
            XmlNodeList nameNodeList = xmlNode.SelectNodes("name");

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

            foreach (XmlNode item in nameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        nameIDRef = item.Attributes["id"].Name;
                        XsdTypeString ob = XsdTypeString();
                        IDManager.SetID(nameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        nameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        name = new XsdTypeString(item);
                    }
                }
            }


            XmlNodeList sensitivityCharacteristicsNodeList = xmlNode.SelectNodes("sensitivityCharacteristics");

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

            foreach (XmlNode item in sensitivityCharacteristicsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sensitivityCharacteristicsIDRef = item.Attributes["id"].Name;
                        QuotationCharacteristics ob = QuotationCharacteristics();
                        IDManager.SetID(sensitivityCharacteristicsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sensitivityCharacteristicsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        sensitivityCharacteristics = new QuotationCharacteristics(item);
                    }
                }
            }


            XmlNodeList valuationScenarioReferenceNodeList = xmlNode.SelectNodes("valuationScenarioReference");

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

            foreach (XmlNode item in valuationScenarioReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valuationScenarioReferenceIDRef = item.Attributes["id"].Name;
                        ValuationScenarioReference ob = ValuationScenarioReference();
                        IDManager.SetID(valuationScenarioReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valuationScenarioReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        valuationScenarioReference = new ValuationScenarioReference(item);
                    }
                }
            }


            XmlNodeList pricingInputTypeNodeList = xmlNode.SelectNodes("pricingInputType");

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

            foreach (XmlNode item in pricingInputTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        pricingInputTypeIDRef = item.Attributes["id"].Name;
                        PricingInputType ob = PricingInputType();
                        IDManager.SetID(pricingInputTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        pricingInputTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        pricingInputType = new PricingInputType(item);
                    }
                }
            }


            XmlNodeList pricingInputReferenceNodeList = xmlNode.SelectNodes("pricingInputReference");

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

            foreach (XmlNode item in pricingInputReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        pricingInputReferenceIDRef = item.Attributes["id"].Name;
                        PricingStructureReference ob = PricingStructureReference();
                        IDManager.SetID(pricingInputReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        pricingInputReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        pricingInputReference = new PricingStructureReference(item);
                    }
                }
            }


            XmlNodeList scaleNodeList = xmlNode.SelectNodes("scale");

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

            foreach (XmlNode item in scaleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        scaleIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(scaleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        scaleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        scale = new XsdTypeDecimal(item);
                    }
                }
            }


            XmlNodeList sensitivityDefinitionNodeList = xmlNode.SelectNodes("sensitivityDefinition");

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


            XmlNodeList calculationProcedureNodeList = xmlNode.SelectNodes("calculationProcedure");

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

            foreach (XmlNode item in calculationProcedureNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationProcedureIDRef = item.Attributes["id"].Name;
                        DerivativeCalculationProcedure ob = DerivativeCalculationProcedure();
                        IDManager.SetID(calculationProcedureIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationProcedureIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationProcedure = new DerivativeCalculationProcedure(item);
                    }
                }
            }
        }
 public SensitivitySetDefinition(XmlNode xmlNode)
 {
     XmlNode nameNode = xmlNode.SelectSingleNode("name");
     
     if (nameNode != null)
     {
         if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null) 
         {
             if (nameNode.Attributes["id"] != null) 
             {
                 nameIDRef_ = nameNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(nameNode);
                 IDManager.SetID(nameIDRef_, ob);
             }
             else if (nameNode.Attributes["href"] != null)
             {
                 nameIDRef_ = nameNode.Attributes["href"].Value;
             }
             else
             {
                 name_ = new XsdTypeString(nameNode);
             }
         }
         else
         {
             name_ = new XsdTypeString(nameNode);
         }
     }
     
 
     XmlNode sensitivityCharacteristicsNode = xmlNode.SelectSingleNode("sensitivityCharacteristics");
     
     if (sensitivityCharacteristicsNode != null)
     {
         if (sensitivityCharacteristicsNode.Attributes["href"] != null || sensitivityCharacteristicsNode.Attributes["id"] != null) 
         {
             if (sensitivityCharacteristicsNode.Attributes["id"] != null) 
             {
                 sensitivityCharacteristicsIDRef_ = sensitivityCharacteristicsNode.Attributes["id"].Value;
                 QuotationCharacteristics ob = new QuotationCharacteristics(sensitivityCharacteristicsNode);
                 IDManager.SetID(sensitivityCharacteristicsIDRef_, ob);
             }
             else if (sensitivityCharacteristicsNode.Attributes["href"] != null)
             {
                 sensitivityCharacteristicsIDRef_ = sensitivityCharacteristicsNode.Attributes["href"].Value;
             }
             else
             {
                 sensitivityCharacteristics_ = new QuotationCharacteristics(sensitivityCharacteristicsNode);
             }
         }
         else
         {
             sensitivityCharacteristics_ = new QuotationCharacteristics(sensitivityCharacteristicsNode);
         }
     }
     
 
     XmlNode valuationScenarioReferenceNode = xmlNode.SelectSingleNode("valuationScenarioReference");
     
     if (valuationScenarioReferenceNode != null)
     {
         if (valuationScenarioReferenceNode.Attributes["href"] != null || valuationScenarioReferenceNode.Attributes["id"] != null) 
         {
             if (valuationScenarioReferenceNode.Attributes["id"] != null) 
             {
                 valuationScenarioReferenceIDRef_ = valuationScenarioReferenceNode.Attributes["id"].Value;
                 ValuationScenarioReference ob = new ValuationScenarioReference(valuationScenarioReferenceNode);
                 IDManager.SetID(valuationScenarioReferenceIDRef_, ob);
             }
             else if (valuationScenarioReferenceNode.Attributes["href"] != null)
             {
                 valuationScenarioReferenceIDRef_ = valuationScenarioReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 valuationScenarioReference_ = new ValuationScenarioReference(valuationScenarioReferenceNode);
             }
         }
         else
         {
             valuationScenarioReference_ = new ValuationScenarioReference(valuationScenarioReferenceNode);
         }
     }
     
 
     XmlNode pricingInputTypeNode = xmlNode.SelectSingleNode("pricingInputType");
     
     if (pricingInputTypeNode != null)
     {
         if (pricingInputTypeNode.Attributes["href"] != null || pricingInputTypeNode.Attributes["id"] != null) 
         {
             if (pricingInputTypeNode.Attributes["id"] != null) 
             {
                 pricingInputTypeIDRef_ = pricingInputTypeNode.Attributes["id"].Value;
                 PricingInputType ob = new PricingInputType(pricingInputTypeNode);
                 IDManager.SetID(pricingInputTypeIDRef_, ob);
             }
             else if (pricingInputTypeNode.Attributes["href"] != null)
             {
                 pricingInputTypeIDRef_ = pricingInputTypeNode.Attributes["href"].Value;
             }
             else
             {
                 pricingInputType_ = new PricingInputType(pricingInputTypeNode);
             }
         }
         else
         {
             pricingInputType_ = new PricingInputType(pricingInputTypeNode);
         }
     }
     
 
     XmlNode pricingInputReferenceNode = xmlNode.SelectSingleNode("pricingInputReference");
     
     if (pricingInputReferenceNode != null)
     {
         if (pricingInputReferenceNode.Attributes["href"] != null || pricingInputReferenceNode.Attributes["id"] != null) 
         {
             if (pricingInputReferenceNode.Attributes["id"] != null) 
             {
                 pricingInputReferenceIDRef_ = pricingInputReferenceNode.Attributes["id"].Value;
                 PricingStructureReference ob = new PricingStructureReference(pricingInputReferenceNode);
                 IDManager.SetID(pricingInputReferenceIDRef_, ob);
             }
             else if (pricingInputReferenceNode.Attributes["href"] != null)
             {
                 pricingInputReferenceIDRef_ = pricingInputReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 pricingInputReference_ = new PricingStructureReference(pricingInputReferenceNode);
             }
         }
         else
         {
             pricingInputReference_ = new PricingStructureReference(pricingInputReferenceNode);
         }
     }
     
 
     XmlNode scaleNode = xmlNode.SelectSingleNode("scale");
     
     if (scaleNode != null)
     {
         if (scaleNode.Attributes["href"] != null || scaleNode.Attributes["id"] != null) 
         {
             if (scaleNode.Attributes["id"] != null) 
             {
                 scaleIDRef_ = scaleNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(scaleNode);
                 IDManager.SetID(scaleIDRef_, ob);
             }
             else if (scaleNode.Attributes["href"] != null)
             {
                 scaleIDRef_ = scaleNode.Attributes["href"].Value;
             }
             else
             {
                 scale_ = new XsdTypeDecimal(scaleNode);
             }
         }
         else
         {
             scale_ = new XsdTypeDecimal(scaleNode);
         }
     }
     
 
     XmlNodeList sensitivityDefinitionNodeList = xmlNode.SelectNodes("sensitivityDefinition");
     
     if (sensitivityDefinitionNodeList != null)
     {
         this.sensitivityDefinition_ = new List<SensitivityDefinition>();
         foreach (XmlNode item in sensitivityDefinitionNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     sensitivityDefinitionIDRef_ = item.Attributes["id"].Value;
                     sensitivityDefinition_.Add(new SensitivityDefinition(item));
                     IDManager.SetID(sensitivityDefinitionIDRef_, sensitivityDefinition_[sensitivityDefinition_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     sensitivityDefinitionIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 sensitivityDefinition_.Add(new SensitivityDefinition(item));
                 }
             }
             else
             {
                 sensitivityDefinition_.Add(new SensitivityDefinition(item));
             }
         }
     }
     
 
     XmlNode calculationProcedureNode = xmlNode.SelectSingleNode("calculationProcedure");
     
     if (calculationProcedureNode != null)
     {
         if (calculationProcedureNode.Attributes["href"] != null || calculationProcedureNode.Attributes["id"] != null) 
         {
             if (calculationProcedureNode.Attributes["id"] != null) 
             {
                 calculationProcedureIDRef_ = calculationProcedureNode.Attributes["id"].Value;
                 DerivativeCalculationProcedure ob = new DerivativeCalculationProcedure(calculationProcedureNode);
                 IDManager.SetID(calculationProcedureIDRef_, ob);
             }
             else if (calculationProcedureNode.Attributes["href"] != null)
             {
                 calculationProcedureIDRef_ = calculationProcedureNode.Attributes["href"].Value;
             }
             else
             {
                 calculationProcedure_ = new DerivativeCalculationProcedure(calculationProcedureNode);
             }
         }
         else
         {
             calculationProcedure_ = new DerivativeCalculationProcedure(calculationProcedureNode);
         }
     }
     
 
 }
 public SensitivitySetDefinition(XmlNode xmlNode)
 {
     XmlNodeList nameNodeList = xmlNode.SelectNodes("name");
     if (nameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in nameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 nameIDRef = item.Attributes["id"].Name;
                 XsdTypeString ob = XsdTypeString();
                 IDManager.SetID(nameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 nameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 name = new XsdTypeString(item);
             }
         }
     }
     
 
     XmlNodeList sensitivityCharacteristicsNodeList = xmlNode.SelectNodes("sensitivityCharacteristics");
     if (sensitivityCharacteristicsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sensitivityCharacteristicsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sensitivityCharacteristicsIDRef = item.Attributes["id"].Name;
                 QuotationCharacteristics ob = QuotationCharacteristics();
                 IDManager.SetID(sensitivityCharacteristicsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sensitivityCharacteristicsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sensitivityCharacteristics = new QuotationCharacteristics(item);
             }
         }
     }
     
 
     XmlNodeList valuationScenarioReferenceNodeList = xmlNode.SelectNodes("valuationScenarioReference");
     if (valuationScenarioReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationScenarioReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationScenarioReferenceIDRef = item.Attributes["id"].Name;
                 ValuationScenarioReference ob = ValuationScenarioReference();
                 IDManager.SetID(valuationScenarioReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationScenarioReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationScenarioReference = new ValuationScenarioReference(item);
             }
         }
     }
     
 
     XmlNodeList pricingInputTypeNodeList = xmlNode.SelectNodes("pricingInputType");
     if (pricingInputTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in pricingInputTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 pricingInputTypeIDRef = item.Attributes["id"].Name;
                 PricingInputType ob = PricingInputType();
                 IDManager.SetID(pricingInputTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 pricingInputTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 pricingInputType = new PricingInputType(item);
             }
         }
     }
     
 
     XmlNodeList pricingInputReferenceNodeList = xmlNode.SelectNodes("pricingInputReference");
     if (pricingInputReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in pricingInputReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 pricingInputReferenceIDRef = item.Attributes["id"].Name;
                 PricingStructureReference ob = PricingStructureReference();
                 IDManager.SetID(pricingInputReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 pricingInputReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 pricingInputReference = new PricingStructureReference(item);
             }
         }
     }
     
 
     XmlNodeList scaleNodeList = xmlNode.SelectNodes("scale");
     if (scaleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in scaleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 scaleIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(scaleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 scaleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 scale = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList sensitivityDefinitionNodeList = xmlNode.SelectNodes("sensitivityDefinition");
     
     foreach (XmlNode item in sensitivityDefinitionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sensitivityDefinitionIDRef = item.Attributes["id"].Name;
                 List<SensitivityDefinition> ob = new List<SensitivityDefinition>();
                 ob.Add(new SensitivityDefinition(item));
                 IDManager.SetID(sensitivityDefinitionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sensitivityDefinitionIDRef = item.Attributes["href"].Name;
             }
             else
             {
             sensitivityDefinition.Add(new SensitivityDefinition(item));
             }
         }
     }
     
 
     XmlNodeList calculationProcedureNodeList = xmlNode.SelectNodes("calculationProcedure");
     if (calculationProcedureNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationProcedureNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationProcedureIDRef = item.Attributes["id"].Name;
                 DerivativeCalculationProcedure ob = DerivativeCalculationProcedure();
                 IDManager.SetID(calculationProcedureIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationProcedureIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationProcedure = new DerivativeCalculationProcedure(item);
             }
         }
     }
     
 
 }
Exemple #4
0
        public SensitivitySetDefinition(XmlNode xmlNode)
        {
            XmlNode nameNode = xmlNode.SelectSingleNode("name");

            if (nameNode != null)
            {
                if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null)
                {
                    if (nameNode.Attributes["id"] != null)
                    {
                        nameIDRef_ = nameNode.Attributes["id"].Value;
                        XsdTypeString ob = new XsdTypeString(nameNode);
                        IDManager.SetID(nameIDRef_, ob);
                    }
                    else if (nameNode.Attributes["href"] != null)
                    {
                        nameIDRef_ = nameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        name_ = new XsdTypeString(nameNode);
                    }
                }
                else
                {
                    name_ = new XsdTypeString(nameNode);
                }
            }


            XmlNode sensitivityCharacteristicsNode = xmlNode.SelectSingleNode("sensitivityCharacteristics");

            if (sensitivityCharacteristicsNode != null)
            {
                if (sensitivityCharacteristicsNode.Attributes["href"] != null || sensitivityCharacteristicsNode.Attributes["id"] != null)
                {
                    if (sensitivityCharacteristicsNode.Attributes["id"] != null)
                    {
                        sensitivityCharacteristicsIDRef_ = sensitivityCharacteristicsNode.Attributes["id"].Value;
                        QuotationCharacteristics ob = new QuotationCharacteristics(sensitivityCharacteristicsNode);
                        IDManager.SetID(sensitivityCharacteristicsIDRef_, ob);
                    }
                    else if (sensitivityCharacteristicsNode.Attributes["href"] != null)
                    {
                        sensitivityCharacteristicsIDRef_ = sensitivityCharacteristicsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        sensitivityCharacteristics_ = new QuotationCharacteristics(sensitivityCharacteristicsNode);
                    }
                }
                else
                {
                    sensitivityCharacteristics_ = new QuotationCharacteristics(sensitivityCharacteristicsNode);
                }
            }


            XmlNode valuationScenarioReferenceNode = xmlNode.SelectSingleNode("valuationScenarioReference");

            if (valuationScenarioReferenceNode != null)
            {
                if (valuationScenarioReferenceNode.Attributes["href"] != null || valuationScenarioReferenceNode.Attributes["id"] != null)
                {
                    if (valuationScenarioReferenceNode.Attributes["id"] != null)
                    {
                        valuationScenarioReferenceIDRef_ = valuationScenarioReferenceNode.Attributes["id"].Value;
                        ValuationScenarioReference ob = new ValuationScenarioReference(valuationScenarioReferenceNode);
                        IDManager.SetID(valuationScenarioReferenceIDRef_, ob);
                    }
                    else if (valuationScenarioReferenceNode.Attributes["href"] != null)
                    {
                        valuationScenarioReferenceIDRef_ = valuationScenarioReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationScenarioReference_ = new ValuationScenarioReference(valuationScenarioReferenceNode);
                    }
                }
                else
                {
                    valuationScenarioReference_ = new ValuationScenarioReference(valuationScenarioReferenceNode);
                }
            }


            XmlNode pricingInputTypeNode = xmlNode.SelectSingleNode("pricingInputType");

            if (pricingInputTypeNode != null)
            {
                if (pricingInputTypeNode.Attributes["href"] != null || pricingInputTypeNode.Attributes["id"] != null)
                {
                    if (pricingInputTypeNode.Attributes["id"] != null)
                    {
                        pricingInputTypeIDRef_ = pricingInputTypeNode.Attributes["id"].Value;
                        PricingInputType ob = new PricingInputType(pricingInputTypeNode);
                        IDManager.SetID(pricingInputTypeIDRef_, ob);
                    }
                    else if (pricingInputTypeNode.Attributes["href"] != null)
                    {
                        pricingInputTypeIDRef_ = pricingInputTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        pricingInputType_ = new PricingInputType(pricingInputTypeNode);
                    }
                }
                else
                {
                    pricingInputType_ = new PricingInputType(pricingInputTypeNode);
                }
            }


            XmlNode pricingInputReferenceNode = xmlNode.SelectSingleNode("pricingInputReference");

            if (pricingInputReferenceNode != null)
            {
                if (pricingInputReferenceNode.Attributes["href"] != null || pricingInputReferenceNode.Attributes["id"] != null)
                {
                    if (pricingInputReferenceNode.Attributes["id"] != null)
                    {
                        pricingInputReferenceIDRef_ = pricingInputReferenceNode.Attributes["id"].Value;
                        PricingStructureReference ob = new PricingStructureReference(pricingInputReferenceNode);
                        IDManager.SetID(pricingInputReferenceIDRef_, ob);
                    }
                    else if (pricingInputReferenceNode.Attributes["href"] != null)
                    {
                        pricingInputReferenceIDRef_ = pricingInputReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        pricingInputReference_ = new PricingStructureReference(pricingInputReferenceNode);
                    }
                }
                else
                {
                    pricingInputReference_ = new PricingStructureReference(pricingInputReferenceNode);
                }
            }


            XmlNode scaleNode = xmlNode.SelectSingleNode("scale");

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


            XmlNodeList sensitivityDefinitionNodeList = xmlNode.SelectNodes("sensitivityDefinition");

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


            XmlNode calculationProcedureNode = xmlNode.SelectSingleNode("calculationProcedure");

            if (calculationProcedureNode != null)
            {
                if (calculationProcedureNode.Attributes["href"] != null || calculationProcedureNode.Attributes["id"] != null)
                {
                    if (calculationProcedureNode.Attributes["id"] != null)
                    {
                        calculationProcedureIDRef_ = calculationProcedureNode.Attributes["id"].Value;
                        DerivativeCalculationProcedure ob = new DerivativeCalculationProcedure(calculationProcedureNode);
                        IDManager.SetID(calculationProcedureIDRef_, ob);
                    }
                    else if (calculationProcedureNode.Attributes["href"] != null)
                    {
                        calculationProcedureIDRef_ = calculationProcedureNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationProcedure_ = new DerivativeCalculationProcedure(calculationProcedureNode);
                    }
                }
                else
                {
                    calculationProcedure_ = new DerivativeCalculationProcedure(calculationProcedureNode);
                }
            }
        }