public ProtectionTerms(XmlNode xmlNode) { XmlNodeList calculationAmountNodeList = xmlNode.SelectNodes("calculationAmount"); if (calculationAmountNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationAmountIDRef = item.Attributes["id"].Name; Money ob = Money(); IDManager.SetID(calculationAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationAmountIDRef = item.Attributes["href"].Name; } else { calculationAmount = new Money(item); } } } XmlNodeList creditEventsNodeList = xmlNode.SelectNodes("creditEvents"); if (creditEventsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in creditEventsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEventsIDRef = item.Attributes["id"].Name; CreditEvents ob = CreditEvents(); IDManager.SetID(creditEventsIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEventsIDRef = item.Attributes["href"].Name; } else { creditEvents = new CreditEvents(item); } } } XmlNodeList obligationsNodeList = xmlNode.SelectNodes("obligations"); if (obligationsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in obligationsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { obligationsIDRef = item.Attributes["id"].Name; Obligations ob = Obligations(); IDManager.SetID(obligationsIDRef, ob); } else if (item.Attributes.ToString() == "href") { obligationsIDRef = item.Attributes["href"].Name; } else { obligations = new Obligations(item); } } } XmlNodeList floatingAmountEventsNodeList = xmlNode.SelectNodes("floatingAmountEvents"); if (floatingAmountEventsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in floatingAmountEventsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { floatingAmountEventsIDRef = item.Attributes["id"].Name; FloatingAmountEvents ob = FloatingAmountEvents(); IDManager.SetID(floatingAmountEventsIDRef, ob); } else if (item.Attributes.ToString() == "href") { floatingAmountEventsIDRef = item.Attributes["href"].Name; } else { floatingAmountEvents = new FloatingAmountEvents(item); } } } }
public ProtectionTerms(XmlNode xmlNode) { XmlNode calculationAmountNode = xmlNode.SelectSingleNode("calculationAmount"); if (calculationAmountNode != null) { if (calculationAmountNode.Attributes["href"] != null || calculationAmountNode.Attributes["id"] != null) { if (calculationAmountNode.Attributes["id"] != null) { calculationAmountIDRef_ = calculationAmountNode.Attributes["id"].Value; Money ob = new Money(calculationAmountNode); IDManager.SetID(calculationAmountIDRef_, ob); } else if (calculationAmountNode.Attributes["href"] != null) { calculationAmountIDRef_ = calculationAmountNode.Attributes["href"].Value; } else { calculationAmount_ = new Money(calculationAmountNode); } } else { calculationAmount_ = new Money(calculationAmountNode); } } XmlNode creditEventsNode = xmlNode.SelectSingleNode("creditEvents"); if (creditEventsNode != null) { if (creditEventsNode.Attributes["href"] != null || creditEventsNode.Attributes["id"] != null) { if (creditEventsNode.Attributes["id"] != null) { creditEventsIDRef_ = creditEventsNode.Attributes["id"].Value; CreditEvents ob = new CreditEvents(creditEventsNode); IDManager.SetID(creditEventsIDRef_, ob); } else if (creditEventsNode.Attributes["href"] != null) { creditEventsIDRef_ = creditEventsNode.Attributes["href"].Value; } else { creditEvents_ = new CreditEvents(creditEventsNode); } } else { creditEvents_ = new CreditEvents(creditEventsNode); } } XmlNode obligationsNode = xmlNode.SelectSingleNode("obligations"); if (obligationsNode != null) { if (obligationsNode.Attributes["href"] != null || obligationsNode.Attributes["id"] != null) { if (obligationsNode.Attributes["id"] != null) { obligationsIDRef_ = obligationsNode.Attributes["id"].Value; Obligations ob = new Obligations(obligationsNode); IDManager.SetID(obligationsIDRef_, ob); } else if (obligationsNode.Attributes["href"] != null) { obligationsIDRef_ = obligationsNode.Attributes["href"].Value; } else { obligations_ = new Obligations(obligationsNode); } } else { obligations_ = new Obligations(obligationsNode); } } XmlNode floatingAmountEventsNode = xmlNode.SelectSingleNode("floatingAmountEvents"); if (floatingAmountEventsNode != null) { if (floatingAmountEventsNode.Attributes["href"] != null || floatingAmountEventsNode.Attributes["id"] != null) { if (floatingAmountEventsNode.Attributes["id"] != null) { floatingAmountEventsIDRef_ = floatingAmountEventsNode.Attributes["id"].Value; FloatingAmountEvents ob = new FloatingAmountEvents(floatingAmountEventsNode); IDManager.SetID(floatingAmountEventsIDRef_, ob); } else if (floatingAmountEventsNode.Attributes["href"] != null) { floatingAmountEventsIDRef_ = floatingAmountEventsNode.Attributes["href"].Value; } else { floatingAmountEvents_ = new FloatingAmountEvents(floatingAmountEventsNode); } } else { floatingAmountEvents_ = new FloatingAmountEvents(floatingAmountEventsNode); } } }
public ProtectionTerms(XmlNode xmlNode) { XmlNodeList calculationAmountNodeList = xmlNode.SelectNodes("calculationAmount"); if (calculationAmountNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in calculationAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationAmountIDRef = item.Attributes["id"].Name; Money ob = Money(); IDManager.SetID(calculationAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationAmountIDRef = item.Attributes["href"].Name; } else { calculationAmount = new Money(item); } } } XmlNodeList creditEventsNodeList = xmlNode.SelectNodes("creditEvents"); if (creditEventsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in creditEventsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEventsIDRef = item.Attributes["id"].Name; CreditEvents ob = CreditEvents(); IDManager.SetID(creditEventsIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEventsIDRef = item.Attributes["href"].Name; } else { creditEvents = new CreditEvents(item); } } } XmlNodeList obligationsNodeList = xmlNode.SelectNodes("obligations"); if (obligationsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in obligationsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { obligationsIDRef = item.Attributes["id"].Name; Obligations ob = Obligations(); IDManager.SetID(obligationsIDRef, ob); } else if (item.Attributes.ToString() == "href") { obligationsIDRef = item.Attributes["href"].Name; } else { obligations = new Obligations(item); } } } XmlNodeList floatingAmountEventsNodeList = xmlNode.SelectNodes("floatingAmountEvents"); if (floatingAmountEventsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in floatingAmountEventsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { floatingAmountEventsIDRef = item.Attributes["id"].Name; FloatingAmountEvents ob = FloatingAmountEvents(); IDManager.SetID(floatingAmountEventsIDRef, ob); } else if (item.Attributes.ToString() == "href") { floatingAmountEventsIDRef = item.Attributes["href"].Name; } else { floatingAmountEvents = new FloatingAmountEvents(item); } } } }
public ProtectionTerms(XmlNode xmlNode) { XmlNode calculationAmountNode = xmlNode.SelectSingleNode("calculationAmount"); if (calculationAmountNode != null) { if (calculationAmountNode.Attributes["href"] != null || calculationAmountNode.Attributes["id"] != null) { if (calculationAmountNode.Attributes["id"] != null) { calculationAmountIDRef_ = calculationAmountNode.Attributes["id"].Value; Money ob = new Money(calculationAmountNode); IDManager.SetID(calculationAmountIDRef_, ob); } else if (calculationAmountNode.Attributes["href"] != null) { calculationAmountIDRef_ = calculationAmountNode.Attributes["href"].Value; } else { calculationAmount_ = new Money(calculationAmountNode); } } else { calculationAmount_ = new Money(calculationAmountNode); } } XmlNode creditEventsNode = xmlNode.SelectSingleNode("creditEvents"); if (creditEventsNode != null) { if (creditEventsNode.Attributes["href"] != null || creditEventsNode.Attributes["id"] != null) { if (creditEventsNode.Attributes["id"] != null) { creditEventsIDRef_ = creditEventsNode.Attributes["id"].Value; CreditEvents ob = new CreditEvents(creditEventsNode); IDManager.SetID(creditEventsIDRef_, ob); } else if (creditEventsNode.Attributes["href"] != null) { creditEventsIDRef_ = creditEventsNode.Attributes["href"].Value; } else { creditEvents_ = new CreditEvents(creditEventsNode); } } else { creditEvents_ = new CreditEvents(creditEventsNode); } } XmlNode obligationsNode = xmlNode.SelectSingleNode("obligations"); if (obligationsNode != null) { if (obligationsNode.Attributes["href"] != null || obligationsNode.Attributes["id"] != null) { if (obligationsNode.Attributes["id"] != null) { obligationsIDRef_ = obligationsNode.Attributes["id"].Value; Obligations ob = new Obligations(obligationsNode); IDManager.SetID(obligationsIDRef_, ob); } else if (obligationsNode.Attributes["href"] != null) { obligationsIDRef_ = obligationsNode.Attributes["href"].Value; } else { obligations_ = new Obligations(obligationsNode); } } else { obligations_ = new Obligations(obligationsNode); } } XmlNode floatingAmountEventsNode = xmlNode.SelectSingleNode("floatingAmountEvents"); if (floatingAmountEventsNode != null) { if (floatingAmountEventsNode.Attributes["href"] != null || floatingAmountEventsNode.Attributes["id"] != null) { if (floatingAmountEventsNode.Attributes["id"] != null) { floatingAmountEventsIDRef_ = floatingAmountEventsNode.Attributes["id"].Value; FloatingAmountEvents ob = new FloatingAmountEvents(floatingAmountEventsNode); IDManager.SetID(floatingAmountEventsIDRef_, ob); } else if (floatingAmountEventsNode.Attributes["href"] != null) { floatingAmountEventsIDRef_ = floatingAmountEventsNode.Attributes["href"].Value; } else { floatingAmountEvents_ = new FloatingAmountEvents(floatingAmountEventsNode); } } else { floatingAmountEvents_ = new FloatingAmountEvents(floatingAmountEventsNode); } } }