public Price(XmlNode xmlNode)
        {
            XmlNode commissionNode = xmlNode.SelectSingleNode("commission");

            if (commissionNode != null)
            {
                if (commissionNode.Attributes["href"] != null || commissionNode.Attributes["id"] != null)
                {
                    if (commissionNode.Attributes["id"] != null)
                    {
                        commissionIDRef_ = commissionNode.Attributes["id"].Value;
                        Commission ob = new Commission(commissionNode);
                        IDManager.SetID(commissionIDRef_, ob);
                    }
                    else if (commissionNode.Attributes["href"] != null)
                    {
                        commissionIDRef_ = commissionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        commission_ = new Commission(commissionNode);
                    }
                }
                else
                {
                    commission_ = new Commission(commissionNode);
                }
            }


            XmlNode determinationMethodNode = xmlNode.SelectSingleNode("determinationMethod");

            if (determinationMethodNode != null)
            {
                if (determinationMethodNode.Attributes["href"] != null || determinationMethodNode.Attributes["id"] != null)
                {
                    if (determinationMethodNode.Attributes["id"] != null)
                    {
                        determinationMethodIDRef_ = determinationMethodNode.Attributes["id"].Value;
                        DeterminationMethod ob = new DeterminationMethod(determinationMethodNode);
                        IDManager.SetID(determinationMethodIDRef_, ob);
                    }
                    else if (determinationMethodNode.Attributes["href"] != null)
                    {
                        determinationMethodIDRef_ = determinationMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        determinationMethod_ = new DeterminationMethod(determinationMethodNode);
                    }
                }
                else
                {
                    determinationMethod_ = new DeterminationMethod(determinationMethodNode);
                }
            }


            XmlNode grossPriceNode = xmlNode.SelectSingleNode("grossPrice");

            if (grossPriceNode != null)
            {
                if (grossPriceNode.Attributes["href"] != null || grossPriceNode.Attributes["id"] != null)
                {
                    if (grossPriceNode.Attributes["id"] != null)
                    {
                        grossPriceIDRef_ = grossPriceNode.Attributes["id"].Value;
                        ActualPrice ob = new ActualPrice(grossPriceNode);
                        IDManager.SetID(grossPriceIDRef_, ob);
                    }
                    else if (grossPriceNode.Attributes["href"] != null)
                    {
                        grossPriceIDRef_ = grossPriceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        grossPrice_ = new ActualPrice(grossPriceNode);
                    }
                }
                else
                {
                    grossPrice_ = new ActualPrice(grossPriceNode);
                }
            }


            XmlNode netPriceNode = xmlNode.SelectSingleNode("netPrice");

            if (netPriceNode != null)
            {
                if (netPriceNode.Attributes["href"] != null || netPriceNode.Attributes["id"] != null)
                {
                    if (netPriceNode.Attributes["id"] != null)
                    {
                        netPriceIDRef_ = netPriceNode.Attributes["id"].Value;
                        ActualPrice ob = new ActualPrice(netPriceNode);
                        IDManager.SetID(netPriceIDRef_, ob);
                    }
                    else if (netPriceNode.Attributes["href"] != null)
                    {
                        netPriceIDRef_ = netPriceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        netPrice_ = new ActualPrice(netPriceNode);
                    }
                }
                else
                {
                    netPrice_ = new ActualPrice(netPriceNode);
                }
            }


            XmlNode accruedInterestPriceNode = xmlNode.SelectSingleNode("accruedInterestPrice");

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


            XmlNode fxConversionNode = xmlNode.SelectSingleNode("fxConversion");

            if (fxConversionNode != null)
            {
                if (fxConversionNode.Attributes["href"] != null || fxConversionNode.Attributes["id"] != null)
                {
                    if (fxConversionNode.Attributes["id"] != null)
                    {
                        fxConversionIDRef_ = fxConversionNode.Attributes["id"].Value;
                        FxConversion ob = new FxConversion(fxConversionNode);
                        IDManager.SetID(fxConversionIDRef_, ob);
                    }
                    else if (fxConversionNode.Attributes["href"] != null)
                    {
                        fxConversionIDRef_ = fxConversionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fxConversion_ = new FxConversion(fxConversionNode);
                    }
                }
                else
                {
                    fxConversion_ = new FxConversion(fxConversionNode);
                }
            }


            XmlNode amountRelativeToNode = xmlNode.SelectSingleNode("amountRelativeTo");

            if (amountRelativeToNode != null)
            {
                if (amountRelativeToNode.Attributes["href"] != null || amountRelativeToNode.Attributes["id"] != null)
                {
                    if (amountRelativeToNode.Attributes["id"] != null)
                    {
                        amountRelativeToIDRef_ = amountRelativeToNode.Attributes["id"].Value;
                        AmountReference ob = new AmountReference(amountRelativeToNode);
                        IDManager.SetID(amountRelativeToIDRef_, ob);
                    }
                    else if (amountRelativeToNode.Attributes["href"] != null)
                    {
                        amountRelativeToIDRef_ = amountRelativeToNode.Attributes["href"].Value;
                    }
                    else
                    {
                        amountRelativeTo_ = new AmountReference(amountRelativeToNode);
                    }
                }
                else
                {
                    amountRelativeTo_ = new AmountReference(amountRelativeToNode);
                }
            }


            XmlNode cleanNetPriceNode = xmlNode.SelectSingleNode("cleanNetPrice");

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


            XmlNode quotationCharacteristicsNode = xmlNode.SelectSingleNode("quotationCharacteristics");

            if (quotationCharacteristicsNode != null)
            {
                if (quotationCharacteristicsNode.Attributes["href"] != null || quotationCharacteristicsNode.Attributes["id"] != null)
                {
                    if (quotationCharacteristicsNode.Attributes["id"] != null)
                    {
                        quotationCharacteristicsIDRef_ = quotationCharacteristicsNode.Attributes["id"].Value;
                        QuotationCharacteristics ob = new QuotationCharacteristics(quotationCharacteristicsNode);
                        IDManager.SetID(quotationCharacteristicsIDRef_, ob);
                    }
                    else if (quotationCharacteristicsNode.Attributes["href"] != null)
                    {
                        quotationCharacteristicsIDRef_ = quotationCharacteristicsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        quotationCharacteristics_ = new QuotationCharacteristics(quotationCharacteristicsNode);
                    }
                }
                else
                {
                    quotationCharacteristics_ = new QuotationCharacteristics(quotationCharacteristicsNode);
                }
            }
        }
        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 Price(XmlNode xmlNode)
 {
     XmlNodeList commissionNodeList = xmlNode.SelectNodes("commission");
     if (commissionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commissionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commissionIDRef = item.Attributes["id"].Name;
                 Commission ob = Commission();
                 IDManager.SetID(commissionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commissionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commission = new Commission(item);
             }
         }
     }
     
 
     XmlNodeList determinationMethodNodeList = xmlNode.SelectNodes("determinationMethod");
     if (determinationMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in determinationMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 determinationMethodIDRef = item.Attributes["id"].Name;
                 DeterminationMethod ob = DeterminationMethod();
                 IDManager.SetID(determinationMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 determinationMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 determinationMethod = new DeterminationMethod(item);
             }
         }
     }
     
 
     XmlNodeList grossPriceNodeList = xmlNode.SelectNodes("grossPrice");
     if (grossPriceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in grossPriceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 grossPriceIDRef = item.Attributes["id"].Name;
                 ActualPrice ob = ActualPrice();
                 IDManager.SetID(grossPriceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 grossPriceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 grossPrice = new ActualPrice(item);
             }
         }
     }
     
 
     XmlNodeList netPriceNodeList = xmlNode.SelectNodes("netPrice");
     if (netPriceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in netPriceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 netPriceIDRef = item.Attributes["id"].Name;
                 ActualPrice ob = ActualPrice();
                 IDManager.SetID(netPriceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 netPriceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 netPrice = new ActualPrice(item);
             }
         }
     }
     
 
     XmlNodeList accruedInterestPriceNodeList = xmlNode.SelectNodes("accruedInterestPrice");
     if (accruedInterestPriceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in accruedInterestPriceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 accruedInterestPriceIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(accruedInterestPriceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 accruedInterestPriceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 accruedInterestPrice = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList fxConversionNodeList = xmlNode.SelectNodes("fxConversion");
     if (fxConversionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxConversionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxConversionIDRef = item.Attributes["id"].Name;
                 FxConversion ob = FxConversion();
                 IDManager.SetID(fxConversionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxConversionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxConversion = new FxConversion(item);
             }
         }
     }
     
 
     XmlNodeList amountRelativeToNodeList = xmlNode.SelectNodes("amountRelativeTo");
     if (amountRelativeToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in amountRelativeToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 amountRelativeToIDRef = item.Attributes["id"].Name;
                 AmountReference ob = AmountReference();
                 IDManager.SetID(amountRelativeToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 amountRelativeToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 amountRelativeTo = new AmountReference(item);
             }
         }
     }
     
 
     XmlNodeList cleanNetPriceNodeList = xmlNode.SelectNodes("cleanNetPrice");
     if (cleanNetPriceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cleanNetPriceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cleanNetPriceIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(cleanNetPriceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cleanNetPriceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cleanNetPrice = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList quotationCharacteristicsNodeList = xmlNode.SelectNodes("quotationCharacteristics");
     if (quotationCharacteristicsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quotationCharacteristicsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quotationCharacteristicsIDRef = item.Attributes["id"].Name;
                 QuotationCharacteristics ob = QuotationCharacteristics();
                 IDManager.SetID(quotationCharacteristicsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quotationCharacteristicsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quotationCharacteristics = new QuotationCharacteristics(item);
             }
         }
     }
     
 
 }
 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);
         }
     }
     
 
 }
Exemplo n.º 6
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);
                }
            }
        }
 public Price(XmlNode xmlNode)
 {
     XmlNode commissionNode = xmlNode.SelectSingleNode("commission");
     
     if (commissionNode != null)
     {
         if (commissionNode.Attributes["href"] != null || commissionNode.Attributes["id"] != null) 
         {
             if (commissionNode.Attributes["id"] != null) 
             {
                 commissionIDRef_ = commissionNode.Attributes["id"].Value;
                 Commission ob = new Commission(commissionNode);
                 IDManager.SetID(commissionIDRef_, ob);
             }
             else if (commissionNode.Attributes["href"] != null)
             {
                 commissionIDRef_ = commissionNode.Attributes["href"].Value;
             }
             else
             {
                 commission_ = new Commission(commissionNode);
             }
         }
         else
         {
             commission_ = new Commission(commissionNode);
         }
     }
     
 
     XmlNode determinationMethodNode = xmlNode.SelectSingleNode("determinationMethod");
     
     if (determinationMethodNode != null)
     {
         if (determinationMethodNode.Attributes["href"] != null || determinationMethodNode.Attributes["id"] != null) 
         {
             if (determinationMethodNode.Attributes["id"] != null) 
             {
                 determinationMethodIDRef_ = determinationMethodNode.Attributes["id"].Value;
                 DeterminationMethod ob = new DeterminationMethod(determinationMethodNode);
                 IDManager.SetID(determinationMethodIDRef_, ob);
             }
             else if (determinationMethodNode.Attributes["href"] != null)
             {
                 determinationMethodIDRef_ = determinationMethodNode.Attributes["href"].Value;
             }
             else
             {
                 determinationMethod_ = new DeterminationMethod(determinationMethodNode);
             }
         }
         else
         {
             determinationMethod_ = new DeterminationMethod(determinationMethodNode);
         }
     }
     
 
     XmlNode grossPriceNode = xmlNode.SelectSingleNode("grossPrice");
     
     if (grossPriceNode != null)
     {
         if (grossPriceNode.Attributes["href"] != null || grossPriceNode.Attributes["id"] != null) 
         {
             if (grossPriceNode.Attributes["id"] != null) 
             {
                 grossPriceIDRef_ = grossPriceNode.Attributes["id"].Value;
                 ActualPrice ob = new ActualPrice(grossPriceNode);
                 IDManager.SetID(grossPriceIDRef_, ob);
             }
             else if (grossPriceNode.Attributes["href"] != null)
             {
                 grossPriceIDRef_ = grossPriceNode.Attributes["href"].Value;
             }
             else
             {
                 grossPrice_ = new ActualPrice(grossPriceNode);
             }
         }
         else
         {
             grossPrice_ = new ActualPrice(grossPriceNode);
         }
     }
     
 
     XmlNode netPriceNode = xmlNode.SelectSingleNode("netPrice");
     
     if (netPriceNode != null)
     {
         if (netPriceNode.Attributes["href"] != null || netPriceNode.Attributes["id"] != null) 
         {
             if (netPriceNode.Attributes["id"] != null) 
             {
                 netPriceIDRef_ = netPriceNode.Attributes["id"].Value;
                 ActualPrice ob = new ActualPrice(netPriceNode);
                 IDManager.SetID(netPriceIDRef_, ob);
             }
             else if (netPriceNode.Attributes["href"] != null)
             {
                 netPriceIDRef_ = netPriceNode.Attributes["href"].Value;
             }
             else
             {
                 netPrice_ = new ActualPrice(netPriceNode);
             }
         }
         else
         {
             netPrice_ = new ActualPrice(netPriceNode);
         }
     }
     
 
     XmlNode accruedInterestPriceNode = xmlNode.SelectSingleNode("accruedInterestPrice");
     
     if (accruedInterestPriceNode != null)
     {
         if (accruedInterestPriceNode.Attributes["href"] != null || accruedInterestPriceNode.Attributes["id"] != null) 
         {
             if (accruedInterestPriceNode.Attributes["id"] != null) 
             {
                 accruedInterestPriceIDRef_ = accruedInterestPriceNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(accruedInterestPriceNode);
                 IDManager.SetID(accruedInterestPriceIDRef_, ob);
             }
             else if (accruedInterestPriceNode.Attributes["href"] != null)
             {
                 accruedInterestPriceIDRef_ = accruedInterestPriceNode.Attributes["href"].Value;
             }
             else
             {
                 accruedInterestPrice_ = new XsdTypeDecimal(accruedInterestPriceNode);
             }
         }
         else
         {
             accruedInterestPrice_ = new XsdTypeDecimal(accruedInterestPriceNode);
         }
     }
     
 
     XmlNode fxConversionNode = xmlNode.SelectSingleNode("fxConversion");
     
     if (fxConversionNode != null)
     {
         if (fxConversionNode.Attributes["href"] != null || fxConversionNode.Attributes["id"] != null) 
         {
             if (fxConversionNode.Attributes["id"] != null) 
             {
                 fxConversionIDRef_ = fxConversionNode.Attributes["id"].Value;
                 FxConversion ob = new FxConversion(fxConversionNode);
                 IDManager.SetID(fxConversionIDRef_, ob);
             }
             else if (fxConversionNode.Attributes["href"] != null)
             {
                 fxConversionIDRef_ = fxConversionNode.Attributes["href"].Value;
             }
             else
             {
                 fxConversion_ = new FxConversion(fxConversionNode);
             }
         }
         else
         {
             fxConversion_ = new FxConversion(fxConversionNode);
         }
     }
     
 
     XmlNode amountRelativeToNode = xmlNode.SelectSingleNode("amountRelativeTo");
     
     if (amountRelativeToNode != null)
     {
         if (amountRelativeToNode.Attributes["href"] != null || amountRelativeToNode.Attributes["id"] != null) 
         {
             if (amountRelativeToNode.Attributes["id"] != null) 
             {
                 amountRelativeToIDRef_ = amountRelativeToNode.Attributes["id"].Value;
                 AmountReference ob = new AmountReference(amountRelativeToNode);
                 IDManager.SetID(amountRelativeToIDRef_, ob);
             }
             else if (amountRelativeToNode.Attributes["href"] != null)
             {
                 amountRelativeToIDRef_ = amountRelativeToNode.Attributes["href"].Value;
             }
             else
             {
                 amountRelativeTo_ = new AmountReference(amountRelativeToNode);
             }
         }
         else
         {
             amountRelativeTo_ = new AmountReference(amountRelativeToNode);
         }
     }
     
 
     XmlNode cleanNetPriceNode = xmlNode.SelectSingleNode("cleanNetPrice");
     
     if (cleanNetPriceNode != null)
     {
         if (cleanNetPriceNode.Attributes["href"] != null || cleanNetPriceNode.Attributes["id"] != null) 
         {
             if (cleanNetPriceNode.Attributes["id"] != null) 
             {
                 cleanNetPriceIDRef_ = cleanNetPriceNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(cleanNetPriceNode);
                 IDManager.SetID(cleanNetPriceIDRef_, ob);
             }
             else if (cleanNetPriceNode.Attributes["href"] != null)
             {
                 cleanNetPriceIDRef_ = cleanNetPriceNode.Attributes["href"].Value;
             }
             else
             {
                 cleanNetPrice_ = new XsdTypeDecimal(cleanNetPriceNode);
             }
         }
         else
         {
             cleanNetPrice_ = new XsdTypeDecimal(cleanNetPriceNode);
         }
     }
     
 
     XmlNode quotationCharacteristicsNode = xmlNode.SelectSingleNode("quotationCharacteristics");
     
     if (quotationCharacteristicsNode != null)
     {
         if (quotationCharacteristicsNode.Attributes["href"] != null || quotationCharacteristicsNode.Attributes["id"] != null) 
         {
             if (quotationCharacteristicsNode.Attributes["id"] != null) 
             {
                 quotationCharacteristicsIDRef_ = quotationCharacteristicsNode.Attributes["id"].Value;
                 QuotationCharacteristics ob = new QuotationCharacteristics(quotationCharacteristicsNode);
                 IDManager.SetID(quotationCharacteristicsIDRef_, ob);
             }
             else if (quotationCharacteristicsNode.Attributes["href"] != null)
             {
                 quotationCharacteristicsIDRef_ = quotationCharacteristicsNode.Attributes["href"].Value;
             }
             else
             {
                 quotationCharacteristics_ = new QuotationCharacteristics(quotationCharacteristicsNode);
             }
         }
         else
         {
             quotationCharacteristics_ = new QuotationCharacteristics(quotationCharacteristicsNode);
         }
     }
     
 
 }
Exemplo n.º 8
0
        public Price(XmlNode xmlNode)
        {
            XmlNodeList commissionNodeList = xmlNode.SelectNodes("commission");

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

            foreach (XmlNode item in commissionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        commissionIDRef = item.Attributes["id"].Name;
                        Commission ob = Commission();
                        IDManager.SetID(commissionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        commissionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        commission = new Commission(item);
                    }
                }
            }


            XmlNodeList determinationMethodNodeList = xmlNode.SelectNodes("determinationMethod");

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

            foreach (XmlNode item in determinationMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        determinationMethodIDRef = item.Attributes["id"].Name;
                        DeterminationMethod ob = DeterminationMethod();
                        IDManager.SetID(determinationMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        determinationMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        determinationMethod = new DeterminationMethod(item);
                    }
                }
            }


            XmlNodeList grossPriceNodeList = xmlNode.SelectNodes("grossPrice");

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

            foreach (XmlNode item in grossPriceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        grossPriceIDRef = item.Attributes["id"].Name;
                        ActualPrice ob = ActualPrice();
                        IDManager.SetID(grossPriceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        grossPriceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        grossPrice = new ActualPrice(item);
                    }
                }
            }


            XmlNodeList netPriceNodeList = xmlNode.SelectNodes("netPrice");

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

            foreach (XmlNode item in netPriceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        netPriceIDRef = item.Attributes["id"].Name;
                        ActualPrice ob = ActualPrice();
                        IDManager.SetID(netPriceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        netPriceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        netPrice = new ActualPrice(item);
                    }
                }
            }


            XmlNodeList accruedInterestPriceNodeList = xmlNode.SelectNodes("accruedInterestPrice");

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

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


            XmlNodeList fxConversionNodeList = xmlNode.SelectNodes("fxConversion");

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

            foreach (XmlNode item in fxConversionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fxConversionIDRef = item.Attributes["id"].Name;
                        FxConversion ob = FxConversion();
                        IDManager.SetID(fxConversionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fxConversionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fxConversion = new FxConversion(item);
                    }
                }
            }


            XmlNodeList amountRelativeToNodeList = xmlNode.SelectNodes("amountRelativeTo");

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

            foreach (XmlNode item in amountRelativeToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        amountRelativeToIDRef = item.Attributes["id"].Name;
                        AmountReference ob = AmountReference();
                        IDManager.SetID(amountRelativeToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        amountRelativeToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        amountRelativeTo = new AmountReference(item);
                    }
                }
            }


            XmlNodeList cleanNetPriceNodeList = xmlNode.SelectNodes("cleanNetPrice");

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

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


            XmlNodeList quotationCharacteristicsNodeList = xmlNode.SelectNodes("quotationCharacteristics");

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

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