public PricingParameterDerivative(XmlNode xmlNode) { XmlNode descriptionNode = xmlNode.SelectSingleNode("description"); if (descriptionNode != null) { if (descriptionNode.Attributes["href"] != null || descriptionNode.Attributes["id"] != null) { if (descriptionNode.Attributes["id"] != null) { descriptionIDRef_ = descriptionNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(descriptionNode); IDManager.SetID(descriptionIDRef_, ob); } else if (descriptionNode.Attributes["href"] != null) { descriptionIDRef_ = descriptionNode.Attributes["href"].Value; } else { description_ = new XsdTypeString(descriptionNode); } } else { description_ = new XsdTypeString(descriptionNode); } } XmlNode parameterReferenceNode = xmlNode.SelectSingleNode("parameterReference"); if (parameterReferenceNode != null) { if (parameterReferenceNode.Attributes["href"] != null || parameterReferenceNode.Attributes["id"] != null) { if (parameterReferenceNode.Attributes["id"] != null) { parameterReferenceIDRef_ = parameterReferenceNode.Attributes["id"].Value; AssetOrTermPointOrPricingStructureReference ob = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); IDManager.SetID(parameterReferenceIDRef_, ob); } else if (parameterReferenceNode.Attributes["href"] != null) { parameterReferenceIDRef_ = parameterReferenceNode.Attributes["href"].Value; } else { parameterReference_ = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); } } else { parameterReference_ = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); } } XmlNodeList inputDateReferenceNodeList = xmlNode.SelectNodes("inputDateReference"); if (inputDateReferenceNodeList != null) { this.inputDateReference_ = new List<ValuationReference>(); foreach (XmlNode item in inputDateReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { inputDateReferenceIDRef_ = item.Attributes["id"].Value; inputDateReference_.Add(new ValuationReference(item)); IDManager.SetID(inputDateReferenceIDRef_, inputDateReference_[inputDateReference_.Count - 1 ]); } else if (item.Attributes["href"] != null) { inputDateReferenceIDRef_ = item.Attributes["href"].Value; } else { inputDateReference_.Add(new ValuationReference(item)); } } else { inputDateReference_.Add(new ValuationReference(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 PricingParameterShift(XmlNode xmlNode) { XmlNodeList parameterReferenceNodeList = xmlNode.SelectNodes("parameterReference"); if (parameterReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in parameterReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { parameterReferenceIDRef = item.Attributes["id"].Name; AssetOrTermPointOrPricingStructureReference ob = AssetOrTermPointOrPricingStructureReference(); IDManager.SetID(parameterReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { parameterReferenceIDRef = item.Attributes["href"].Name; } else { parameterReference = new AssetOrTermPointOrPricingStructureReference(item); } } } XmlNodeList shiftNodeList = xmlNode.SelectNodes("shift"); if (shiftNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in shiftNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { shiftIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(shiftIDRef, ob); } else if (item.Attributes.ToString() == "href") { shiftIDRef = item.Attributes["href"].Name; } else { shift = new XsdTypeDecimal(item); } } } XmlNodeList shiftUnitsNodeList = xmlNode.SelectNodes("shiftUnits"); if (shiftUnitsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in shiftUnitsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { shiftUnitsIDRef = item.Attributes["id"].Name; PriceQuoteUnits ob = PriceQuoteUnits(); IDManager.SetID(shiftUnitsIDRef, ob); } else if (item.Attributes.ToString() == "href") { shiftUnitsIDRef = item.Attributes["href"].Name; } else { shiftUnits = new PriceQuoteUnits(item); } } } }
public PricingParameterDerivative(XmlNode xmlNode) { XmlNode descriptionNode = xmlNode.SelectSingleNode("description"); if (descriptionNode != null) { if (descriptionNode.Attributes["href"] != null || descriptionNode.Attributes["id"] != null) { if (descriptionNode.Attributes["id"] != null) { descriptionIDRef_ = descriptionNode.Attributes["id"].Value; XsdTypeString ob = new XsdTypeString(descriptionNode); IDManager.SetID(descriptionIDRef_, ob); } else if (descriptionNode.Attributes["href"] != null) { descriptionIDRef_ = descriptionNode.Attributes["href"].Value; } else { description_ = new XsdTypeString(descriptionNode); } } else { description_ = new XsdTypeString(descriptionNode); } } XmlNode parameterReferenceNode = xmlNode.SelectSingleNode("parameterReference"); if (parameterReferenceNode != null) { if (parameterReferenceNode.Attributes["href"] != null || parameterReferenceNode.Attributes["id"] != null) { if (parameterReferenceNode.Attributes["id"] != null) { parameterReferenceIDRef_ = parameterReferenceNode.Attributes["id"].Value; AssetOrTermPointOrPricingStructureReference ob = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); IDManager.SetID(parameterReferenceIDRef_, ob); } else if (parameterReferenceNode.Attributes["href"] != null) { parameterReferenceIDRef_ = parameterReferenceNode.Attributes["href"].Value; } else { parameterReference_ = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); } } else { parameterReference_ = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); } } XmlNodeList inputDateReferenceNodeList = xmlNode.SelectNodes("inputDateReference"); if (inputDateReferenceNodeList != null) { this.inputDateReference_ = new List <ValuationReference>(); foreach (XmlNode item in inputDateReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { inputDateReferenceIDRef_ = item.Attributes["id"].Value; inputDateReference_.Add(new ValuationReference(item)); IDManager.SetID(inputDateReferenceIDRef_, inputDateReference_[inputDateReference_.Count - 1]); } else if (item.Attributes["href"] != null) { inputDateReferenceIDRef_ = item.Attributes["href"].Value; } else { inputDateReference_.Add(new ValuationReference(item)); } } else { inputDateReference_.Add(new ValuationReference(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 PricingParameterShift(XmlNode xmlNode) { XmlNodeList parameterReferenceNodeList = xmlNode.SelectNodes("parameterReference"); if (parameterReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in parameterReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { parameterReferenceIDRef = item.Attributes["id"].Name; AssetOrTermPointOrPricingStructureReference ob = AssetOrTermPointOrPricingStructureReference(); IDManager.SetID(parameterReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { parameterReferenceIDRef = item.Attributes["href"].Name; } else { parameterReference = new AssetOrTermPointOrPricingStructureReference(item); } } } XmlNodeList shiftNodeList = xmlNode.SelectNodes("shift"); if (shiftNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in shiftNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { shiftIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(shiftIDRef, ob); } else if (item.Attributes.ToString() == "href") { shiftIDRef = item.Attributes["href"].Name; } else { shift = new XsdTypeDecimal(item); } } } XmlNodeList shiftUnitsNodeList = xmlNode.SelectNodes("shiftUnits"); if (shiftUnitsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in shiftUnitsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { shiftUnitsIDRef = item.Attributes["id"].Name; PriceQuoteUnits ob = PriceQuoteUnits(); IDManager.SetID(shiftUnitsIDRef, ob); } else if (item.Attributes.ToString() == "href") { shiftUnitsIDRef = item.Attributes["href"].Name; } else { shiftUnits = new PriceQuoteUnits(item); } } } }
public PricingParameterShift(XmlNode xmlNode) { XmlNode parameterReferenceNode = xmlNode.SelectSingleNode("parameterReference"); if (parameterReferenceNode != null) { if (parameterReferenceNode.Attributes["href"] != null || parameterReferenceNode.Attributes["id"] != null) { if (parameterReferenceNode.Attributes["id"] != null) { parameterReferenceIDRef_ = parameterReferenceNode.Attributes["id"].Value; AssetOrTermPointOrPricingStructureReference ob = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); IDManager.SetID(parameterReferenceIDRef_, ob); } else if (parameterReferenceNode.Attributes["href"] != null) { parameterReferenceIDRef_ = parameterReferenceNode.Attributes["href"].Value; } else { parameterReference_ = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); } } else { parameterReference_ = new AssetOrTermPointOrPricingStructureReference(parameterReferenceNode); } } XmlNode shiftNode = xmlNode.SelectSingleNode("shift"); if (shiftNode != null) { if (shiftNode.Attributes["href"] != null || shiftNode.Attributes["id"] != null) { if (shiftNode.Attributes["id"] != null) { shiftIDRef_ = shiftNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(shiftNode); IDManager.SetID(shiftIDRef_, ob); } else if (shiftNode.Attributes["href"] != null) { shiftIDRef_ = shiftNode.Attributes["href"].Value; } else { shift_ = new XsdTypeDecimal(shiftNode); } } else { shift_ = new XsdTypeDecimal(shiftNode); } } XmlNode shiftUnitsNode = xmlNode.SelectSingleNode("shiftUnits"); if (shiftUnitsNode != null) { if (shiftUnitsNode.Attributes["href"] != null || shiftUnitsNode.Attributes["id"] != null) { if (shiftUnitsNode.Attributes["id"] != null) { shiftUnitsIDRef_ = shiftUnitsNode.Attributes["id"].Value; PriceQuoteUnits ob = new PriceQuoteUnits(shiftUnitsNode); IDManager.SetID(shiftUnitsIDRef_, ob); } else if (shiftUnitsNode.Attributes["href"] != null) { shiftUnitsIDRef_ = shiftUnitsNode.Attributes["href"].Value; } else { shiftUnits_ = new PriceQuoteUnits(shiftUnitsNode); } } else { shiftUnits_ = new PriceQuoteUnits(shiftUnitsNode); } } }
public PricingParameterDerivative(XmlNode xmlNode) { XmlNodeList descriptionNodeList = xmlNode.SelectNodes("description"); if (descriptionNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in descriptionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { descriptionIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(descriptionIDRef, ob); } else if (item.Attributes.ToString() == "href") { descriptionIDRef = item.Attributes["href"].Name; } else { description = new XsdTypeString(item); } } } XmlNodeList parameterReferenceNodeList = xmlNode.SelectNodes("parameterReference"); if (parameterReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in parameterReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { parameterReferenceIDRef = item.Attributes["id"].Name; AssetOrTermPointOrPricingStructureReference ob = AssetOrTermPointOrPricingStructureReference(); IDManager.SetID(parameterReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { parameterReferenceIDRef = item.Attributes["href"].Name; } else { parameterReference = new AssetOrTermPointOrPricingStructureReference(item); } } } XmlNodeList inputDateReferenceNodeList = xmlNode.SelectNodes("inputDateReference"); foreach (XmlNode item in inputDateReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { inputDateReferenceIDRef = item.Attributes["id"].Name; List<ValuationReference> ob = new List<ValuationReference>(); ob.Add(new ValuationReference(item)); IDManager.SetID(inputDateReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { inputDateReferenceIDRef = item.Attributes["href"].Name; } else { inputDateReference.Add(new ValuationReference(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 PricingParameterDerivative(XmlNode xmlNode) { XmlNodeList descriptionNodeList = xmlNode.SelectNodes("description"); if (descriptionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in descriptionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { descriptionIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(descriptionIDRef, ob); } else if (item.Attributes.ToString() == "href") { descriptionIDRef = item.Attributes["href"].Name; } else { description = new XsdTypeString(item); } } } XmlNodeList parameterReferenceNodeList = xmlNode.SelectNodes("parameterReference"); if (parameterReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in parameterReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { parameterReferenceIDRef = item.Attributes["id"].Name; AssetOrTermPointOrPricingStructureReference ob = AssetOrTermPointOrPricingStructureReference(); IDManager.SetID(parameterReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { parameterReferenceIDRef = item.Attributes["href"].Name; } else { parameterReference = new AssetOrTermPointOrPricingStructureReference(item); } } } XmlNodeList inputDateReferenceNodeList = xmlNode.SelectNodes("inputDateReference"); foreach (XmlNode item in inputDateReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { inputDateReferenceIDRef = item.Attributes["id"].Name; List <ValuationReference> ob = new List <ValuationReference>(); ob.Add(new ValuationReference(item)); IDManager.SetID(inputDateReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { inputDateReferenceIDRef = item.Attributes["href"].Name; } else { inputDateReference.Add(new ValuationReference(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); } } } }