public ReturnCalculation(XmlNode xmlNode) : base(xmlNode) { XmlNode typeNode = xmlNode.SelectSingleNode("type"); if (typeNode != null) { if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) { if (typeNode.Attributes["id"] != null) { typeIDRef_ = typeNode.Attributes["id"].Value; XsdTypeToken ob = new XsdTypeToken(typeNode); IDManager.SetID(typeIDRef_, ob); } else if (typeNode.Attributes["href"] != null) { typeIDRef_ = typeNode.Attributes["href"].Value; } else { type_ = new XsdTypeToken(typeNode); } } else { type_ = new XsdTypeToken(typeNode); } } XmlNode preCalculationNode = xmlNode.SelectSingleNode("preCalculation"); if (preCalculationNode != null) { if (preCalculationNode.Attributes["href"] != null || preCalculationNode.Attributes["id"] != null) { if (preCalculationNode.Attributes["id"] != null) { preCalculationIDRef_ = preCalculationNode.Attributes["id"].Value; PreCalculation ob = new PreCalculation(preCalculationNode); IDManager.SetID(preCalculationIDRef_, ob); } else if (preCalculationNode.Attributes["href"] != null) { preCalculationIDRef_ = preCalculationNode.Attributes["href"].Value; } else { preCalculation_ = new PreCalculation(preCalculationNode); } } else { preCalculation_ = new PreCalculation(preCalculationNode); } } XmlNode stopLossReturnCalNode = xmlNode.SelectSingleNode("stopLossReturnCal"); if (stopLossReturnCalNode != null) { if (stopLossReturnCalNode.Attributes["href"] != null || stopLossReturnCalNode.Attributes["id"] != null) { if (stopLossReturnCalNode.Attributes["id"] != null) { stopLossReturnCalIDRef_ = stopLossReturnCalNode.Attributes["id"].Value; StopLossReturnCal ob = new StopLossReturnCal(stopLossReturnCalNode); IDManager.SetID(stopLossReturnCalIDRef_, ob); } else if (stopLossReturnCalNode.Attributes["href"] != null) { stopLossReturnCalIDRef_ = stopLossReturnCalNode.Attributes["href"].Value; } else { stopLossReturnCal_ = new StopLossReturnCal(stopLossReturnCalNode); } } else { stopLossReturnCal_ = new StopLossReturnCal(stopLossReturnCalNode); } } XmlNode constReturnCalNode = xmlNode.SelectSingleNode("constReturnCal"); if (constReturnCalNode != null) { if (constReturnCalNode.Attributes["href"] != null || constReturnCalNode.Attributes["id"] != null) { if (constReturnCalNode.Attributes["id"] != null) { constReturnCalIDRef_ = constReturnCalNode.Attributes["id"].Value; ConstReturnCal ob = new ConstReturnCal(constReturnCalNode); IDManager.SetID(constReturnCalIDRef_, ob); } else if (constReturnCalNode.Attributes["href"] != null) { constReturnCalIDRef_ = constReturnCalNode.Attributes["href"].Value; } else { constReturnCal_ = new ConstReturnCal(constReturnCalNode); } } else { constReturnCal_ = new ConstReturnCal(constReturnCalNode); } } XmlNode vanillaReturnCalNode = xmlNode.SelectSingleNode("vanillaReturnCal"); if (vanillaReturnCalNode != null) { if (vanillaReturnCalNode.Attributes["href"] != null || vanillaReturnCalNode.Attributes["id"] != null) { if (vanillaReturnCalNode.Attributes["id"] != null) { vanillaReturnCalIDRef_ = vanillaReturnCalNode.Attributes["id"].Value; VanillaReturnCal ob = new VanillaReturnCal(vanillaReturnCalNode); IDManager.SetID(vanillaReturnCalIDRef_, ob); } else if (vanillaReturnCalNode.Attributes["href"] != null) { vanillaReturnCalIDRef_ = vanillaReturnCalNode.Attributes["href"].Value; } else { vanillaReturnCal_ = new VanillaReturnCal(vanillaReturnCalNode); } } else { vanillaReturnCal_ = new VanillaReturnCal(vanillaReturnCalNode); } } XmlNode complex1DReturnCalNode = xmlNode.SelectSingleNode("complex1DReturnCal"); if (complex1DReturnCalNode != null) { if (complex1DReturnCalNode.Attributes["href"] != null || complex1DReturnCalNode.Attributes["id"] != null) { if (complex1DReturnCalNode.Attributes["id"] != null) { complex1DReturnCalIDRef_ = complex1DReturnCalNode.Attributes["id"].Value; Complex1DReturnCal ob = new Complex1DReturnCal(complex1DReturnCalNode); IDManager.SetID(complex1DReturnCalIDRef_, ob); } else if (complex1DReturnCalNode.Attributes["href"] != null) { complex1DReturnCalIDRef_ = complex1DReturnCalNode.Attributes["href"].Value; } else { complex1DReturnCal_ = new Complex1DReturnCal(complex1DReturnCalNode); } } else { complex1DReturnCal_ = new Complex1DReturnCal(complex1DReturnCalNode); } } XmlNode complexNDReturnCalNode = xmlNode.SelectSingleNode("complexNDReturnCal"); if (complexNDReturnCalNode != null) { if (complexNDReturnCalNode.Attributes["href"] != null || complexNDReturnCalNode.Attributes["id"] != null) { if (complexNDReturnCalNode.Attributes["id"] != null) { complexNDReturnCalIDRef_ = complexNDReturnCalNode.Attributes["id"].Value; ComplexNDReturnCal ob = new ComplexNDReturnCal(complexNDReturnCalNode); IDManager.SetID(complexNDReturnCalIDRef_, ob); } else if (complexNDReturnCalNode.Attributes["href"] != null) { complexNDReturnCalIDRef_ = complexNDReturnCalNode.Attributes["href"].Value; } else { complexNDReturnCal_ = new ComplexNDReturnCal(complexNDReturnCalNode); } } else { complexNDReturnCal_ = new ComplexNDReturnCal(complexNDReturnCalNode); } } XmlNode zeroReturnCalNode = xmlNode.SelectSingleNode("zeroReturnCal"); if (zeroReturnCalNode != null) { if (zeroReturnCalNode.Attributes["href"] != null || zeroReturnCalNode.Attributes["id"] != null) { if (zeroReturnCalNode.Attributes["id"] != null) { zeroReturnCalIDRef_ = zeroReturnCalNode.Attributes["id"].Value; ZeroReturnCal ob = new ZeroReturnCal(zeroReturnCalNode); IDManager.SetID(zeroReturnCalIDRef_, ob); } else if (zeroReturnCalNode.Attributes["href"] != null) { zeroReturnCalIDRef_ = zeroReturnCalNode.Attributes["href"].Value; } else { zeroReturnCal_ = new ZeroReturnCal(zeroReturnCalNode); } } else { zeroReturnCal_ = new ZeroReturnCal(zeroReturnCalNode); } } XmlNode callPutCompositeReturnCalNode = xmlNode.SelectSingleNode("callPutCompositeReturnCal"); if (callPutCompositeReturnCalNode != null) { if (callPutCompositeReturnCalNode.Attributes["href"] != null || callPutCompositeReturnCalNode.Attributes["id"] != null) { if (callPutCompositeReturnCalNode.Attributes["id"] != null) { callPutCompositeReturnCalIDRef_ = callPutCompositeReturnCalNode.Attributes["id"].Value; CallPutCompositeReturnCal ob = new CallPutCompositeReturnCal(callPutCompositeReturnCalNode); IDManager.SetID(callPutCompositeReturnCalIDRef_, ob); } else if (callPutCompositeReturnCalNode.Attributes["href"] != null) { callPutCompositeReturnCalIDRef_ = callPutCompositeReturnCalNode.Attributes["href"].Value; } else { callPutCompositeReturnCal_ = new CallPutCompositeReturnCal(callPutCompositeReturnCalNode); } } else { callPutCompositeReturnCal_ = new CallPutCompositeReturnCal(callPutCompositeReturnCalNode); } } XmlNode postCalculationNode = xmlNode.SelectSingleNode("postCalculation"); if (postCalculationNode != null) { if (postCalculationNode.Attributes["href"] != null || postCalculationNode.Attributes["id"] != null) { if (postCalculationNode.Attributes["id"] != null) { postCalculationIDRef_ = postCalculationNode.Attributes["id"].Value; PostCalculation ob = new PostCalculation(postCalculationNode); IDManager.SetID(postCalculationIDRef_, ob); } else if (postCalculationNode.Attributes["href"] != null) { postCalculationIDRef_ = postCalculationNode.Attributes["href"].Value; } else { postCalculation_ = new PostCalculation(postCalculationNode); } } else { postCalculation_ = new PostCalculation(postCalculationNode); } } XmlNode refVariable_returnValueNode = xmlNode.SelectSingleNode("refVariable_returnValue"); if (refVariable_returnValueNode != null) { if (refVariable_returnValueNode.Attributes["href"] != null || refVariable_returnValueNode.Attributes["id"] != null) { if (refVariable_returnValueNode.Attributes["id"] != null) { refVariable_returnValueIDRef_ = refVariable_returnValueNode.Attributes["id"].Value; RefVariable_returnValue ob = new RefVariable_returnValue(refVariable_returnValueNode); IDManager.SetID(refVariable_returnValueIDRef_, ob); } else if (refVariable_returnValueNode.Attributes["href"] != null) { refVariable_returnValueIDRef_ = refVariable_returnValueNode.Attributes["href"].Value; } else { refVariable_returnValue_ = new RefVariable_returnValue(refVariable_returnValueNode); } } else { refVariable_returnValue_ = new RefVariable_returnValue(refVariable_returnValueNode); } } XmlNode resetVariableInfoNode = xmlNode.SelectSingleNode("resetVariableInfo"); if (resetVariableInfoNode != null) { if (resetVariableInfoNode.Attributes["href"] != null || resetVariableInfoNode.Attributes["id"] != null) { if (resetVariableInfoNode.Attributes["id"] != null) { resetVariableInfoIDRef_ = resetVariableInfoNode.Attributes["id"].Value; ResetVariableInfo ob = new ResetVariableInfo(resetVariableInfoNode); IDManager.SetID(resetVariableInfoIDRef_, ob); } else if (resetVariableInfoNode.Attributes["href"] != null) { resetVariableInfoIDRef_ = resetVariableInfoNode.Attributes["href"].Value; } else { resetVariableInfo_ = new ResetVariableInfo(resetVariableInfoNode); } } else { resetVariableInfo_ = new ResetVariableInfo(resetVariableInfoNode); } } }