public ReferenceCalculationInfo(XmlNode xmlNode) : base(xmlNode) { XmlNode fixingInformationNode = xmlNode.SelectSingleNode("fixingInformation"); if (fixingInformationNode != null) { if (fixingInformationNode.Attributes["href"] != null || fixingInformationNode.Attributes["id"] != null) { if (fixingInformationNode.Attributes["id"] != null) { fixingInformationIDRef_ = fixingInformationNode.Attributes["id"].Value; FixingInformation ob = new FixingInformation(fixingInformationNode); IDManager.SetID(fixingInformationIDRef_, ob); } else if (fixingInformationNode.Attributes["href"] != null) { fixingInformationIDRef_ = fixingInformationNode.Attributes["href"].Value; } else { fixingInformation_ = new FixingInformation(fixingInformationNode); } } else { fixingInformation_ = new FixingInformation(fixingInformationNode); } } XmlNodeList referenceCalculationNodeList = xmlNode.SelectNodes("referenceCalculation"); if (referenceCalculationNodeList != null) { this.referenceCalculation_ = new List<ReferenceCalculation>(); foreach (XmlNode item in referenceCalculationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { referenceCalculationIDRef_ = item.Attributes["id"].Value; referenceCalculation_.Add(new ReferenceCalculation(item)); IDManager.SetID(referenceCalculationIDRef_, referenceCalculation_[referenceCalculation_.Count - 1 ]); } else if (item.Attributes["href"] != null) { referenceCalculationIDRef_ = item.Attributes["href"].Value; } else { referenceCalculation_.Add(new ReferenceCalculation(item)); } } else { referenceCalculation_.Add(new ReferenceCalculation(item)); } } } XmlNode operatorNDNode = xmlNode.SelectSingleNode("operatorND"); if (operatorNDNode != null) { if (operatorNDNode.Attributes["href"] != null || operatorNDNode.Attributes["id"] != null) { if (operatorNDNode.Attributes["id"] != null) { operatorNDIDRef_ = operatorNDNode.Attributes["id"].Value; OperatorND ob = new OperatorND(operatorNDNode); IDManager.SetID(operatorNDIDRef_, ob); } else if (operatorNDNode.Attributes["href"] != null) { operatorNDIDRef_ = operatorNDNode.Attributes["href"].Value; } else { operatorND_ = new OperatorND(operatorNDNode); } } else { operatorND_ = new OperatorND(operatorNDNode); } } 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_referenceValueNode = xmlNode.SelectSingleNode("refVariable_referenceValue"); if (refVariable_referenceValueNode != null) { if (refVariable_referenceValueNode.Attributes["href"] != null || refVariable_referenceValueNode.Attributes["id"] != null) { if (refVariable_referenceValueNode.Attributes["id"] != null) { refVariable_referenceValueIDRef_ = refVariable_referenceValueNode.Attributes["id"].Value; RefVariable_referenceValue ob = new RefVariable_referenceValue(refVariable_referenceValueNode); IDManager.SetID(refVariable_referenceValueIDRef_, ob); } else if (refVariable_referenceValueNode.Attributes["href"] != null) { refVariable_referenceValueIDRef_ = refVariable_referenceValueNode.Attributes["href"].Value; } else { refVariable_referenceValue_ = new RefVariable_referenceValue(refVariable_referenceValueNode); } } else { refVariable_referenceValue_ = new RefVariable_referenceValue(refVariable_referenceValueNode); } } }
public EventTrigger(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 eventDateNode = xmlNode.SelectSingleNode("eventDate"); if (eventDateNode != null) { if (eventDateNode.Attributes["href"] != null || eventDateNode.Attributes["id"] != null) { if (eventDateNode.Attributes["id"] != null) { eventDateIDRef_ = eventDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(eventDateNode); IDManager.SetID(eventDateIDRef_, ob); } else if (eventDateNode.Attributes["href"] != null) { eventDateIDRef_ = eventDateNode.Attributes["href"].Value; } else { eventDate_ = new XsdTypeDate(eventDateNode); } } else { eventDate_ = new XsdTypeDate(eventDateNode); } } XmlNode autoTerminationTriggerNode = xmlNode.SelectSingleNode("autoTerminationTrigger"); if (autoTerminationTriggerNode != null) { if (autoTerminationTriggerNode.Attributes["href"] != null || autoTerminationTriggerNode.Attributes["id"] != null) { if (autoTerminationTriggerNode.Attributes["id"] != null) { autoTerminationTriggerIDRef_ = autoTerminationTriggerNode.Attributes["id"].Value; AutoTerminationTrigger ob = new AutoTerminationTrigger(autoTerminationTriggerNode); IDManager.SetID(autoTerminationTriggerIDRef_, ob); } else if (autoTerminationTriggerNode.Attributes["href"] != null) { autoTerminationTriggerIDRef_ = autoTerminationTriggerNode.Attributes["href"].Value; } else { autoTerminationTrigger_ = new AutoTerminationTrigger(autoTerminationTriggerNode); } } else { autoTerminationTrigger_ = new AutoTerminationTrigger(autoTerminationTriggerNode); } } XmlNode preEventCalculationNode = xmlNode.SelectSingleNode("preEventCalculation"); if (preEventCalculationNode != null) { if (preEventCalculationNode.Attributes["href"] != null || preEventCalculationNode.Attributes["id"] != null) { if (preEventCalculationNode.Attributes["id"] != null) { preEventCalculationIDRef_ = preEventCalculationNode.Attributes["id"].Value; PreEventCalculation ob = new PreEventCalculation(preEventCalculationNode); IDManager.SetID(preEventCalculationIDRef_, ob); } else if (preEventCalculationNode.Attributes["href"] != null) { preEventCalculationIDRef_ = preEventCalculationNode.Attributes["href"].Value; } else { preEventCalculation_ = new PreEventCalculation(preEventCalculationNode); } } else { preEventCalculation_ = new PreEventCalculation(preEventCalculationNode); } } XmlNode preConditionEventNode = xmlNode.SelectSingleNode("preConditionEvent"); if (preConditionEventNode != null) { if (preConditionEventNode.Attributes["href"] != null || preConditionEventNode.Attributes["id"] != null) { if (preConditionEventNode.Attributes["id"] != null) { preConditionEventIDRef_ = preConditionEventNode.Attributes["id"].Value; PreConditionEvent ob = new PreConditionEvent(preConditionEventNode); IDManager.SetID(preConditionEventIDRef_, ob); } else if (preConditionEventNode.Attributes["href"] != null) { preConditionEventIDRef_ = preConditionEventNode.Attributes["href"].Value; } else { preConditionEvent_ = new PreConditionEvent(preConditionEventNode); } } else { preConditionEvent_ = new PreConditionEvent(preConditionEventNode); } } XmlNode autoCallConstReturnTriggerNode = xmlNode.SelectSingleNode("autoCallConstReturnTrigger"); if (autoCallConstReturnTriggerNode != null) { if (autoCallConstReturnTriggerNode.Attributes["href"] != null || autoCallConstReturnTriggerNode.Attributes["id"] != null) { if (autoCallConstReturnTriggerNode.Attributes["id"] != null) { autoCallConstReturnTriggerIDRef_ = autoCallConstReturnTriggerNode.Attributes["id"].Value; AutoCallConstReturnTrigger ob = new AutoCallConstReturnTrigger(autoCallConstReturnTriggerNode); IDManager.SetID(autoCallConstReturnTriggerIDRef_, ob); } else if (autoCallConstReturnTriggerNode.Attributes["href"] != null) { autoCallConstReturnTriggerIDRef_ = autoCallConstReturnTriggerNode.Attributes["href"].Value; } else { autoCallConstReturnTrigger_ = new AutoCallConstReturnTrigger(autoCallConstReturnTriggerNode); } } else { autoCallConstReturnTrigger_ = new AutoCallConstReturnTrigger(autoCallConstReturnTriggerNode); } } XmlNode simpleRangeConstReturnTriggerNode = xmlNode.SelectSingleNode("simpleRangeConstReturnTrigger"); if (simpleRangeConstReturnTriggerNode != null) { if (simpleRangeConstReturnTriggerNode.Attributes["href"] != null || simpleRangeConstReturnTriggerNode.Attributes["id"] != null) { if (simpleRangeConstReturnTriggerNode.Attributes["id"] != null) { simpleRangeConstReturnTriggerIDRef_ = simpleRangeConstReturnTriggerNode.Attributes["id"].Value; SimpleRangeConstReturnTrigger ob = new SimpleRangeConstReturnTrigger(simpleRangeConstReturnTriggerNode); IDManager.SetID(simpleRangeConstReturnTriggerIDRef_, ob); } else if (simpleRangeConstReturnTriggerNode.Attributes["href"] != null) { simpleRangeConstReturnTriggerIDRef_ = simpleRangeConstReturnTriggerNode.Attributes["href"].Value; } else { simpleRangeConstReturnTrigger_ = new SimpleRangeConstReturnTrigger(simpleRangeConstReturnTriggerNode); } } else { simpleRangeConstReturnTrigger_ = new SimpleRangeConstReturnTrigger(simpleRangeConstReturnTriggerNode); } } XmlNode simpleRangeRateTriggerNode = xmlNode.SelectSingleNode("simpleRangeRateTrigger"); if (simpleRangeRateTriggerNode != null) { if (simpleRangeRateTriggerNode.Attributes["href"] != null || simpleRangeRateTriggerNode.Attributes["id"] != null) { if (simpleRangeRateTriggerNode.Attributes["id"] != null) { simpleRangeRateTriggerIDRef_ = simpleRangeRateTriggerNode.Attributes["id"].Value; SimpleRangeRateTrigger ob = new SimpleRangeRateTrigger(simpleRangeRateTriggerNode); IDManager.SetID(simpleRangeRateTriggerIDRef_, ob); } else if (simpleRangeRateTriggerNode.Attributes["href"] != null) { simpleRangeRateTriggerIDRef_ = simpleRangeRateTriggerNode.Attributes["href"].Value; } else { simpleRangeRateTrigger_ = new SimpleRangeRateTrigger(simpleRangeRateTriggerNode); } } else { simpleRangeRateTrigger_ = new SimpleRangeRateTrigger(simpleRangeRateTriggerNode); } } XmlNode simpleRangeAccrualRateTriggerNode = xmlNode.SelectSingleNode("simpleRangeAccrualRateTrigger"); if (simpleRangeAccrualRateTriggerNode != null) { if (simpleRangeAccrualRateTriggerNode.Attributes["href"] != null || simpleRangeAccrualRateTriggerNode.Attributes["id"] != null) { if (simpleRangeAccrualRateTriggerNode.Attributes["id"] != null) { simpleRangeAccrualRateTriggerIDRef_ = simpleRangeAccrualRateTriggerNode.Attributes["id"].Value; SimpleRangeAccrualRateTrigger ob = new SimpleRangeAccrualRateTrigger(simpleRangeAccrualRateTriggerNode); IDManager.SetID(simpleRangeAccrualRateTriggerIDRef_, ob); } else if (simpleRangeAccrualRateTriggerNode.Attributes["href"] != null) { simpleRangeAccrualRateTriggerIDRef_ = simpleRangeAccrualRateTriggerNode.Attributes["href"].Value; } else { simpleRangeAccrualRateTrigger_ = new SimpleRangeAccrualRateTrigger(simpleRangeAccrualRateTriggerNode); } } else { simpleRangeAccrualRateTrigger_ = new SimpleRangeAccrualRateTrigger(simpleRangeAccrualRateTriggerNode); } } XmlNode fixedRateTriggerNode = xmlNode.SelectSingleNode("fixedRateTrigger"); if (fixedRateTriggerNode != null) { if (fixedRateTriggerNode.Attributes["href"] != null || fixedRateTriggerNode.Attributes["id"] != null) { if (fixedRateTriggerNode.Attributes["id"] != null) { fixedRateTriggerIDRef_ = fixedRateTriggerNode.Attributes["id"].Value; FixedRateTrigger ob = new FixedRateTrigger(fixedRateTriggerNode); IDManager.SetID(fixedRateTriggerIDRef_, ob); } else if (fixedRateTriggerNode.Attributes["href"] != null) { fixedRateTriggerIDRef_ = fixedRateTriggerNode.Attributes["href"].Value; } else { fixedRateTrigger_ = new FixedRateTrigger(fixedRateTriggerNode); } } else { fixedRateTrigger_ = new FixedRateTrigger(fixedRateTriggerNode); } } XmlNode vanillaRateTriggerNode = xmlNode.SelectSingleNode("vanillaRateTrigger"); if (vanillaRateTriggerNode != null) { if (vanillaRateTriggerNode.Attributes["href"] != null || vanillaRateTriggerNode.Attributes["id"] != null) { if (vanillaRateTriggerNode.Attributes["id"] != null) { vanillaRateTriggerIDRef_ = vanillaRateTriggerNode.Attributes["id"].Value; VanillaRateTrigger ob = new VanillaRateTrigger(vanillaRateTriggerNode); IDManager.SetID(vanillaRateTriggerIDRef_, ob); } else if (vanillaRateTriggerNode.Attributes["href"] != null) { vanillaRateTriggerIDRef_ = vanillaRateTriggerNode.Attributes["href"].Value; } else { vanillaRateTrigger_ = new VanillaRateTrigger(vanillaRateTriggerNode); } } else { vanillaRateTrigger_ = new VanillaRateTrigger(vanillaRateTriggerNode); } } XmlNode redemptionNotionalTriggerNode = xmlNode.SelectSingleNode("redemptionNotionalTrigger"); if (redemptionNotionalTriggerNode != null) { if (redemptionNotionalTriggerNode.Attributes["href"] != null || redemptionNotionalTriggerNode.Attributes["id"] != null) { if (redemptionNotionalTriggerNode.Attributes["id"] != null) { redemptionNotionalTriggerIDRef_ = redemptionNotionalTriggerNode.Attributes["id"].Value; RedemptionNotionalTrigger ob = new RedemptionNotionalTrigger(redemptionNotionalTriggerNode); IDManager.SetID(redemptionNotionalTriggerIDRef_, ob); } else if (redemptionNotionalTriggerNode.Attributes["href"] != null) { redemptionNotionalTriggerIDRef_ = redemptionNotionalTriggerNode.Attributes["href"].Value; } else { redemptionNotionalTrigger_ = new RedemptionNotionalTrigger(redemptionNotionalTriggerNode); } } else { redemptionNotionalTrigger_ = new RedemptionNotionalTrigger(redemptionNotionalTriggerNode); } } XmlNode autoCallRangeReturnTriggerNode = xmlNode.SelectSingleNode("autoCallRangeReturnTrigger"); if (autoCallRangeReturnTriggerNode != null) { if (autoCallRangeReturnTriggerNode.Attributes["href"] != null || autoCallRangeReturnTriggerNode.Attributes["id"] != null) { if (autoCallRangeReturnTriggerNode.Attributes["id"] != null) { autoCallRangeReturnTriggerIDRef_ = autoCallRangeReturnTriggerNode.Attributes["id"].Value; AutoCallRangeReturnTrigger ob = new AutoCallRangeReturnTrigger(autoCallRangeReturnTriggerNode); IDManager.SetID(autoCallRangeReturnTriggerIDRef_, ob); } else if (autoCallRangeReturnTriggerNode.Attributes["href"] != null) { autoCallRangeReturnTriggerIDRef_ = autoCallRangeReturnTriggerNode.Attributes["href"].Value; } else { autoCallRangeReturnTrigger_ = new AutoCallRangeReturnTrigger(autoCallRangeReturnTriggerNode); } } else { autoCallRangeReturnTrigger_ = new AutoCallRangeReturnTrigger(autoCallRangeReturnTriggerNode); } } XmlNode vanillaCouponTriggerNode = xmlNode.SelectSingleNode("vanillaCouponTrigger"); if (vanillaCouponTriggerNode != null) { if (vanillaCouponTriggerNode.Attributes["href"] != null || vanillaCouponTriggerNode.Attributes["id"] != null) { if (vanillaCouponTriggerNode.Attributes["id"] != null) { vanillaCouponTriggerIDRef_ = vanillaCouponTriggerNode.Attributes["id"].Value; VanillaCouponTrigger ob = new VanillaCouponTrigger(vanillaCouponTriggerNode); IDManager.SetID(vanillaCouponTriggerIDRef_, ob); } else if (vanillaCouponTriggerNode.Attributes["href"] != null) { vanillaCouponTriggerIDRef_ = vanillaCouponTriggerNode.Attributes["href"].Value; } else { vanillaCouponTrigger_ = new VanillaCouponTrigger(vanillaCouponTriggerNode); } } else { vanillaCouponTrigger_ = new VanillaCouponTrigger(vanillaCouponTriggerNode); } } XmlNode simpleEventCouponTriggerNode = xmlNode.SelectSingleNode("simpleEventCouponTrigger"); if (simpleEventCouponTriggerNode != null) { if (simpleEventCouponTriggerNode.Attributes["href"] != null || simpleEventCouponTriggerNode.Attributes["id"] != null) { if (simpleEventCouponTriggerNode.Attributes["id"] != null) { simpleEventCouponTriggerIDRef_ = simpleEventCouponTriggerNode.Attributes["id"].Value; SimpleEventCouponTrigger ob = new SimpleEventCouponTrigger(simpleEventCouponTriggerNode); IDManager.SetID(simpleEventCouponTriggerIDRef_, ob); } else if (simpleEventCouponTriggerNode.Attributes["href"] != null) { simpleEventCouponTriggerIDRef_ = simpleEventCouponTriggerNode.Attributes["href"].Value; } else { simpleEventCouponTrigger_ = new SimpleEventCouponTrigger(simpleEventCouponTriggerNode); } } else { simpleEventCouponTrigger_ = new SimpleEventCouponTrigger(simpleEventCouponTriggerNode); } } 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); } } }
public ReferenceCalculation(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 fixingInformationNode = xmlNode.SelectSingleNode("fixingInformation"); if (fixingInformationNode != null) { if (fixingInformationNode.Attributes["href"] != null || fixingInformationNode.Attributes["id"] != null) { if (fixingInformationNode.Attributes["id"] != null) { fixingInformationIDRef_ = fixingInformationNode.Attributes["id"].Value; FixingInformation ob = new FixingInformation(fixingInformationNode); IDManager.SetID(fixingInformationIDRef_, ob); } else if (fixingInformationNode.Attributes["href"] != null) { fixingInformationIDRef_ = fixingInformationNode.Attributes["href"].Value; } else { fixingInformation_ = new FixingInformation(fixingInformationNode); } } else { fixingInformation_ = new FixingInformation(fixingInformationNode); } } XmlNode choiceReferenceCalNode = xmlNode.SelectSingleNode("choiceReferenceCal"); if (choiceReferenceCalNode != null) { if (choiceReferenceCalNode.Attributes["href"] != null || choiceReferenceCalNode.Attributes["id"] != null) { if (choiceReferenceCalNode.Attributes["id"] != null) { choiceReferenceCalIDRef_ = choiceReferenceCalNode.Attributes["id"].Value; ChoiceReferenceCal ob = new ChoiceReferenceCal(choiceReferenceCalNode); IDManager.SetID(choiceReferenceCalIDRef_, ob); } else if (choiceReferenceCalNode.Attributes["href"] != null) { choiceReferenceCalIDRef_ = choiceReferenceCalNode.Attributes["href"].Value; } else { choiceReferenceCal_ = new ChoiceReferenceCal(choiceReferenceCalNode); } } else { choiceReferenceCal_ = new ChoiceReferenceCal(choiceReferenceCalNode); } } XmlNode identityReferenceCalNode = xmlNode.SelectSingleNode("identityReferenceCal"); if (identityReferenceCalNode != null) { if (identityReferenceCalNode.Attributes["href"] != null || identityReferenceCalNode.Attributes["id"] != null) { if (identityReferenceCalNode.Attributes["id"] != null) { identityReferenceCalIDRef_ = identityReferenceCalNode.Attributes["id"].Value; IdentityReferenceCal ob = new IdentityReferenceCal(identityReferenceCalNode); IDManager.SetID(identityReferenceCalIDRef_, ob); } else if (identityReferenceCalNode.Attributes["href"] != null) { identityReferenceCalIDRef_ = identityReferenceCalNode.Attributes["href"].Value; } else { identityReferenceCal_ = new IdentityReferenceCal(identityReferenceCalNode); } } else { identityReferenceCal_ = new IdentityReferenceCal(identityReferenceCalNode); } } XmlNode maximumReferenceCalNode = xmlNode.SelectSingleNode("maximumReferenceCal"); if (maximumReferenceCalNode != null) { if (maximumReferenceCalNode.Attributes["href"] != null || maximumReferenceCalNode.Attributes["id"] != null) { if (maximumReferenceCalNode.Attributes["id"] != null) { maximumReferenceCalIDRef_ = maximumReferenceCalNode.Attributes["id"].Value; MaximumReferenceCal ob = new MaximumReferenceCal(maximumReferenceCalNode); IDManager.SetID(maximumReferenceCalIDRef_, ob); } else if (maximumReferenceCalNode.Attributes["href"] != null) { maximumReferenceCalIDRef_ = maximumReferenceCalNode.Attributes["href"].Value; } else { maximumReferenceCal_ = new MaximumReferenceCal(maximumReferenceCalNode); } } else { maximumReferenceCal_ = new MaximumReferenceCal(maximumReferenceCalNode); } } XmlNode minimumReferenceCalNode = xmlNode.SelectSingleNode("minimumReferenceCal"); if (minimumReferenceCalNode != null) { if (minimumReferenceCalNode.Attributes["href"] != null || minimumReferenceCalNode.Attributes["id"] != null) { if (minimumReferenceCalNode.Attributes["id"] != null) { minimumReferenceCalIDRef_ = minimumReferenceCalNode.Attributes["id"].Value; MinimumReferenceCal ob = new MinimumReferenceCal(minimumReferenceCalNode); IDManager.SetID(minimumReferenceCalIDRef_, ob); } else if (minimumReferenceCalNode.Attributes["href"] != null) { minimumReferenceCalIDRef_ = minimumReferenceCalNode.Attributes["href"].Value; } else { minimumReferenceCal_ = new MinimumReferenceCal(minimumReferenceCalNode); } } else { minimumReferenceCal_ = new MinimumReferenceCal(minimumReferenceCalNode); } } XmlNode refVariableReferenceCalNode = xmlNode.SelectSingleNode("refVariableReferenceCal"); if (refVariableReferenceCalNode != null) { if (refVariableReferenceCalNode.Attributes["href"] != null || refVariableReferenceCalNode.Attributes["id"] != null) { if (refVariableReferenceCalNode.Attributes["id"] != null) { refVariableReferenceCalIDRef_ = refVariableReferenceCalNode.Attributes["id"].Value; RefVariableReferenceCal ob = new RefVariableReferenceCal(refVariableReferenceCalNode); IDManager.SetID(refVariableReferenceCalIDRef_, ob); } else if (refVariableReferenceCalNode.Attributes["href"] != null) { refVariableReferenceCalIDRef_ = refVariableReferenceCalNode.Attributes["href"].Value; } else { refVariableReferenceCal_ = new RefVariableReferenceCal(refVariableReferenceCalNode); } } else { refVariableReferenceCal_ = new RefVariableReferenceCal(refVariableReferenceCalNode); } } XmlNode dailyReturnReferenceCalNode = xmlNode.SelectSingleNode("dailyReturnReferenceCal"); if (dailyReturnReferenceCalNode != null) { if (dailyReturnReferenceCalNode.Attributes["href"] != null || dailyReturnReferenceCalNode.Attributes["id"] != null) { if (dailyReturnReferenceCalNode.Attributes["id"] != null) { dailyReturnReferenceCalIDRef_ = dailyReturnReferenceCalNode.Attributes["id"].Value; DailyReturnReferenceCal ob = new DailyReturnReferenceCal(dailyReturnReferenceCalNode); IDManager.SetID(dailyReturnReferenceCalIDRef_, ob); } else if (dailyReturnReferenceCalNode.Attributes["href"] != null) { dailyReturnReferenceCalIDRef_ = dailyReturnReferenceCalNode.Attributes["href"].Value; } else { dailyReturnReferenceCal_ = new DailyReturnReferenceCal(dailyReturnReferenceCalNode); } } else { dailyReturnReferenceCal_ = new DailyReturnReferenceCal(dailyReturnReferenceCalNode); } } 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_referenceValueNode = xmlNode.SelectSingleNode("refVariable_referenceValue"); if (refVariable_referenceValueNode != null) { if (refVariable_referenceValueNode.Attributes["href"] != null || refVariable_referenceValueNode.Attributes["id"] != null) { if (refVariable_referenceValueNode.Attributes["id"] != null) { refVariable_referenceValueIDRef_ = refVariable_referenceValueNode.Attributes["id"].Value; RefVariable_referenceValue ob = new RefVariable_referenceValue(refVariable_referenceValueNode); IDManager.SetID(refVariable_referenceValueIDRef_, ob); } else if (refVariable_referenceValueNode.Attributes["href"] != null) { refVariable_referenceValueIDRef_ = refVariable_referenceValueNode.Attributes["href"].Value; } else { refVariable_referenceValue_ = new RefVariable_referenceValue(refVariable_referenceValueNode); } } else { refVariable_referenceValue_ = new RefVariable_referenceValue(refVariable_referenceValueNode); } } }
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); } } }
public ReferenceCalculationInfo(XmlNode xmlNode) : base(xmlNode) { XmlNode fixingInformationNode = xmlNode.SelectSingleNode("fixingInformation"); if (fixingInformationNode != null) { if (fixingInformationNode.Attributes["href"] != null || fixingInformationNode.Attributes["id"] != null) { if (fixingInformationNode.Attributes["id"] != null) { fixingInformationIDRef_ = fixingInformationNode.Attributes["id"].Value; FixingInformation ob = new FixingInformation(fixingInformationNode); IDManager.SetID(fixingInformationIDRef_, ob); } else if (fixingInformationNode.Attributes["href"] != null) { fixingInformationIDRef_ = fixingInformationNode.Attributes["href"].Value; } else { fixingInformation_ = new FixingInformation(fixingInformationNode); } } else { fixingInformation_ = new FixingInformation(fixingInformationNode); } } XmlNodeList referenceCalculationNodeList = xmlNode.SelectNodes("referenceCalculation"); if (referenceCalculationNodeList != null) { this.referenceCalculation_ = new List <ReferenceCalculation>(); foreach (XmlNode item in referenceCalculationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { referenceCalculationIDRef_ = item.Attributes["id"].Value; referenceCalculation_.Add(new ReferenceCalculation(item)); IDManager.SetID(referenceCalculationIDRef_, referenceCalculation_[referenceCalculation_.Count - 1]); } else if (item.Attributes["href"] != null) { referenceCalculationIDRef_ = item.Attributes["href"].Value; } else { referenceCalculation_.Add(new ReferenceCalculation(item)); } } else { referenceCalculation_.Add(new ReferenceCalculation(item)); } } } XmlNode operatorNDNode = xmlNode.SelectSingleNode("operatorND"); if (operatorNDNode != null) { if (operatorNDNode.Attributes["href"] != null || operatorNDNode.Attributes["id"] != null) { if (operatorNDNode.Attributes["id"] != null) { operatorNDIDRef_ = operatorNDNode.Attributes["id"].Value; OperatorND ob = new OperatorND(operatorNDNode); IDManager.SetID(operatorNDIDRef_, ob); } else if (operatorNDNode.Attributes["href"] != null) { operatorNDIDRef_ = operatorNDNode.Attributes["href"].Value; } else { operatorND_ = new OperatorND(operatorNDNode); } } else { operatorND_ = new OperatorND(operatorNDNode); } } 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_referenceValueNode = xmlNode.SelectSingleNode("refVariable_referenceValue"); if (refVariable_referenceValueNode != null) { if (refVariable_referenceValueNode.Attributes["href"] != null || refVariable_referenceValueNode.Attributes["id"] != null) { if (refVariable_referenceValueNode.Attributes["id"] != null) { refVariable_referenceValueIDRef_ = refVariable_referenceValueNode.Attributes["id"].Value; RefVariable_referenceValue ob = new RefVariable_referenceValue(refVariable_referenceValueNode); IDManager.SetID(refVariable_referenceValueIDRef_, ob); } else if (refVariable_referenceValueNode.Attributes["href"] != null) { refVariable_referenceValueIDRef_ = refVariable_referenceValueNode.Attributes["href"].Value; } else { refVariable_referenceValue_ = new RefVariable_referenceValue(refVariable_referenceValueNode); } } else { refVariable_referenceValue_ = new RefVariable_referenceValue(refVariable_referenceValueNode); } } }