public MandatoryEarlyTermination(XmlNode xmlNode) { XmlNodeList mandatoryEarlyTerminationDateNodeList = xmlNode.SelectNodes("mandatoryEarlyTerminationDate"); if (mandatoryEarlyTerminationDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in mandatoryEarlyTerminationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { mandatoryEarlyTerminationDateIDRef = item.Attributes["id"].Name; AdjustableDate ob = AdjustableDate(); IDManager.SetID(mandatoryEarlyTerminationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { mandatoryEarlyTerminationDateIDRef = item.Attributes["href"].Name; } else { mandatoryEarlyTerminationDate = new AdjustableDate(item); } } } XmlNodeList calculationAgentNodeList = xmlNode.SelectNodes("calculationAgent"); if (calculationAgentNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationAgentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationAgentIDRef = item.Attributes["id"].Name; CalculationAgent ob = CalculationAgent(); IDManager.SetID(calculationAgentIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationAgentIDRef = item.Attributes["href"].Name; } else { calculationAgent = new CalculationAgent(item); } } } XmlNodeList cashSettlementNodeList = xmlNode.SelectNodes("cashSettlement"); if (cashSettlementNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in cashSettlementNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { cashSettlementIDRef = item.Attributes["id"].Name; CashSettlement ob = CashSettlement(); IDManager.SetID(cashSettlementIDRef, ob); } else if (item.Attributes.ToString() == "href") { cashSettlementIDRef = item.Attributes["href"].Name; } else { cashSettlement = new CashSettlement(item); } } } XmlNodeList mandatoryEarlyTerminationAdjustedDatesNodeList = xmlNode.SelectNodes("mandatoryEarlyTerminationAdjustedDates"); if (mandatoryEarlyTerminationAdjustedDatesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in mandatoryEarlyTerminationAdjustedDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { mandatoryEarlyTerminationAdjustedDatesIDRef = item.Attributes["id"].Name; MandatoryEarlyTerminationAdjustedDates ob = MandatoryEarlyTerminationAdjustedDates(); IDManager.SetID(mandatoryEarlyTerminationAdjustedDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { mandatoryEarlyTerminationAdjustedDatesIDRef = item.Attributes["href"].Name; } else { mandatoryEarlyTerminationAdjustedDates = new MandatoryEarlyTerminationAdjustedDates(item); } } } }
public MandatoryEarlyTermination(XmlNode xmlNode) { XmlNode mandatoryEarlyTerminationDateNode = xmlNode.SelectSingleNode("mandatoryEarlyTerminationDate"); if (mandatoryEarlyTerminationDateNode != null) { if (mandatoryEarlyTerminationDateNode.Attributes["href"] != null || mandatoryEarlyTerminationDateNode.Attributes["id"] != null) { if (mandatoryEarlyTerminationDateNode.Attributes["id"] != null) { mandatoryEarlyTerminationDateIDRef_ = mandatoryEarlyTerminationDateNode.Attributes["id"].Value; AdjustableDate ob = new AdjustableDate(mandatoryEarlyTerminationDateNode); IDManager.SetID(mandatoryEarlyTerminationDateIDRef_, ob); } else if (mandatoryEarlyTerminationDateNode.Attributes["href"] != null) { mandatoryEarlyTerminationDateIDRef_ = mandatoryEarlyTerminationDateNode.Attributes["href"].Value; } else { mandatoryEarlyTerminationDate_ = new AdjustableDate(mandatoryEarlyTerminationDateNode); } } else { mandatoryEarlyTerminationDate_ = new AdjustableDate(mandatoryEarlyTerminationDateNode); } } XmlNode calculationAgentNode = xmlNode.SelectSingleNode("calculationAgent"); if (calculationAgentNode != null) { if (calculationAgentNode.Attributes["href"] != null || calculationAgentNode.Attributes["id"] != null) { if (calculationAgentNode.Attributes["id"] != null) { calculationAgentIDRef_ = calculationAgentNode.Attributes["id"].Value; CalculationAgent ob = new CalculationAgent(calculationAgentNode); IDManager.SetID(calculationAgentIDRef_, ob); } else if (calculationAgentNode.Attributes["href"] != null) { calculationAgentIDRef_ = calculationAgentNode.Attributes["href"].Value; } else { calculationAgent_ = new CalculationAgent(calculationAgentNode); } } else { calculationAgent_ = new CalculationAgent(calculationAgentNode); } } XmlNode cashSettlementNode = xmlNode.SelectSingleNode("cashSettlement"); if (cashSettlementNode != null) { if (cashSettlementNode.Attributes["href"] != null || cashSettlementNode.Attributes["id"] != null) { if (cashSettlementNode.Attributes["id"] != null) { cashSettlementIDRef_ = cashSettlementNode.Attributes["id"].Value; CashSettlement ob = new CashSettlement(cashSettlementNode); IDManager.SetID(cashSettlementIDRef_, ob); } else if (cashSettlementNode.Attributes["href"] != null) { cashSettlementIDRef_ = cashSettlementNode.Attributes["href"].Value; } else { cashSettlement_ = new CashSettlement(cashSettlementNode); } } else { cashSettlement_ = new CashSettlement(cashSettlementNode); } } XmlNode mandatoryEarlyTerminationAdjustedDatesNode = xmlNode.SelectSingleNode("mandatoryEarlyTerminationAdjustedDates"); if (mandatoryEarlyTerminationAdjustedDatesNode != null) { if (mandatoryEarlyTerminationAdjustedDatesNode.Attributes["href"] != null || mandatoryEarlyTerminationAdjustedDatesNode.Attributes["id"] != null) { if (mandatoryEarlyTerminationAdjustedDatesNode.Attributes["id"] != null) { mandatoryEarlyTerminationAdjustedDatesIDRef_ = mandatoryEarlyTerminationAdjustedDatesNode.Attributes["id"].Value; MandatoryEarlyTerminationAdjustedDates ob = new MandatoryEarlyTerminationAdjustedDates(mandatoryEarlyTerminationAdjustedDatesNode); IDManager.SetID(mandatoryEarlyTerminationAdjustedDatesIDRef_, ob); } else if (mandatoryEarlyTerminationAdjustedDatesNode.Attributes["href"] != null) { mandatoryEarlyTerminationAdjustedDatesIDRef_ = mandatoryEarlyTerminationAdjustedDatesNode.Attributes["href"].Value; } else { mandatoryEarlyTerminationAdjustedDates_ = new MandatoryEarlyTerminationAdjustedDates(mandatoryEarlyTerminationAdjustedDatesNode); } } else { mandatoryEarlyTerminationAdjustedDates_ = new MandatoryEarlyTerminationAdjustedDates(mandatoryEarlyTerminationAdjustedDatesNode); } } }
public MandatoryEarlyTermination(XmlNode xmlNode) { XmlNodeList mandatoryEarlyTerminationDateNodeList = xmlNode.SelectNodes("mandatoryEarlyTerminationDate"); if (mandatoryEarlyTerminationDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in mandatoryEarlyTerminationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { mandatoryEarlyTerminationDateIDRef = item.Attributes["id"].Name; AdjustableDate ob = AdjustableDate(); IDManager.SetID(mandatoryEarlyTerminationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { mandatoryEarlyTerminationDateIDRef = item.Attributes["href"].Name; } else { mandatoryEarlyTerminationDate = new AdjustableDate(item); } } } XmlNodeList calculationAgentNodeList = xmlNode.SelectNodes("calculationAgent"); if (calculationAgentNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in calculationAgentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationAgentIDRef = item.Attributes["id"].Name; CalculationAgent ob = CalculationAgent(); IDManager.SetID(calculationAgentIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationAgentIDRef = item.Attributes["href"].Name; } else { calculationAgent = new CalculationAgent(item); } } } XmlNodeList cashSettlementNodeList = xmlNode.SelectNodes("cashSettlement"); if (cashSettlementNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in cashSettlementNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { cashSettlementIDRef = item.Attributes["id"].Name; CashSettlement ob = CashSettlement(); IDManager.SetID(cashSettlementIDRef, ob); } else if (item.Attributes.ToString() == "href") { cashSettlementIDRef = item.Attributes["href"].Name; } else { cashSettlement = new CashSettlement(item); } } } XmlNodeList mandatoryEarlyTerminationAdjustedDatesNodeList = xmlNode.SelectNodes("mandatoryEarlyTerminationAdjustedDates"); if (mandatoryEarlyTerminationAdjustedDatesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in mandatoryEarlyTerminationAdjustedDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { mandatoryEarlyTerminationAdjustedDatesIDRef = item.Attributes["id"].Name; MandatoryEarlyTerminationAdjustedDates ob = MandatoryEarlyTerminationAdjustedDates(); IDManager.SetID(mandatoryEarlyTerminationAdjustedDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { mandatoryEarlyTerminationAdjustedDatesIDRef = item.Attributes["href"].Name; } else { mandatoryEarlyTerminationAdjustedDates = new MandatoryEarlyTerminationAdjustedDates(item); } } } }