public ReturnSwapNotional(XmlNode xmlNode) { XmlNode relativeNotionalAmountNode = xmlNode.SelectSingleNode("relativeNotionalAmount"); if (relativeNotionalAmountNode != null) { if (relativeNotionalAmountNode.Attributes["href"] != null || relativeNotionalAmountNode.Attributes["id"] != null) { if (relativeNotionalAmountNode.Attributes["id"] != null) { relativeNotionalAmountIDRef_ = relativeNotionalAmountNode.Attributes["id"].Value; ReturnSwapNotionalAmountReference ob = new ReturnSwapNotionalAmountReference(relativeNotionalAmountNode); IDManager.SetID(relativeNotionalAmountIDRef_, ob); } else if (relativeNotionalAmountNode.Attributes["href"] != null) { relativeNotionalAmountIDRef_ = relativeNotionalAmountNode.Attributes["href"].Value; } else { relativeNotionalAmount_ = new ReturnSwapNotionalAmountReference(relativeNotionalAmountNode); } } else { relativeNotionalAmount_ = new ReturnSwapNotionalAmountReference(relativeNotionalAmountNode); } } XmlNode relativeDeterminationMethodNode = xmlNode.SelectSingleNode("relativeDeterminationMethod"); if (relativeDeterminationMethodNode != null) { if (relativeDeterminationMethodNode.Attributes["href"] != null || relativeDeterminationMethodNode.Attributes["id"] != null) { if (relativeDeterminationMethodNode.Attributes["id"] != null) { relativeDeterminationMethodIDRef_ = relativeDeterminationMethodNode.Attributes["id"].Value; DeterminationMethodReference ob = new DeterminationMethodReference(relativeDeterminationMethodNode); IDManager.SetID(relativeDeterminationMethodIDRef_, ob); } else if (relativeDeterminationMethodNode.Attributes["href"] != null) { relativeDeterminationMethodIDRef_ = relativeDeterminationMethodNode.Attributes["href"].Value; } else { relativeDeterminationMethod_ = new DeterminationMethodReference(relativeDeterminationMethodNode); } } else { relativeDeterminationMethod_ = new DeterminationMethodReference(relativeDeterminationMethodNode); } } XmlNode determinationMethodNode = xmlNode.SelectSingleNode("determinationMethod"); if (determinationMethodNode != null) { if (determinationMethodNode.Attributes["href"] != null || determinationMethodNode.Attributes["id"] != null) { if (determinationMethodNode.Attributes["id"] != null) { determinationMethodIDRef_ = determinationMethodNode.Attributes["id"].Value; DeterminationMethod ob = new DeterminationMethod(determinationMethodNode); IDManager.SetID(determinationMethodIDRef_, ob); } else if (determinationMethodNode.Attributes["href"] != null) { determinationMethodIDRef_ = determinationMethodNode.Attributes["href"].Value; } else { determinationMethod_ = new DeterminationMethod(determinationMethodNode); } } else { determinationMethod_ = new DeterminationMethod(determinationMethodNode); } } XmlNode notionalAmountNode = xmlNode.SelectSingleNode("notionalAmount"); if (notionalAmountNode != null) { if (notionalAmountNode.Attributes["href"] != null || notionalAmountNode.Attributes["id"] != null) { if (notionalAmountNode.Attributes["id"] != null) { notionalAmountIDRef_ = notionalAmountNode.Attributes["id"].Value; NotionalAmount ob = new NotionalAmount(notionalAmountNode); IDManager.SetID(notionalAmountIDRef_, ob); } else if (notionalAmountNode.Attributes["href"] != null) { notionalAmountIDRef_ = notionalAmountNode.Attributes["href"].Value; } else { notionalAmount_ = new NotionalAmount(notionalAmountNode); } } else { notionalAmount_ = new NotionalAmount(notionalAmountNode); } } }
public ReturnSwapNotional(XmlNode xmlNode) { XmlNodeList relativeNotionalAmountNodeList = xmlNode.SelectNodes("relativeNotionalAmount"); if (relativeNotionalAmountNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in relativeNotionalAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { relativeNotionalAmountIDRef = item.Attributes["id"].Name; ReturnSwapNotionalAmountReference ob = ReturnSwapNotionalAmountReference(); IDManager.SetID(relativeNotionalAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { relativeNotionalAmountIDRef = item.Attributes["href"].Name; } else { relativeNotionalAmount = new ReturnSwapNotionalAmountReference(item); } } } XmlNodeList relativeDeterminationMethodNodeList = xmlNode.SelectNodes("relativeDeterminationMethod"); if (relativeDeterminationMethodNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in relativeDeterminationMethodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { relativeDeterminationMethodIDRef = item.Attributes["id"].Name; DeterminationMethodReference ob = DeterminationMethodReference(); IDManager.SetID(relativeDeterminationMethodIDRef, ob); } else if (item.Attributes.ToString() == "href") { relativeDeterminationMethodIDRef = item.Attributes["href"].Name; } else { relativeDeterminationMethod = new DeterminationMethodReference(item); } } } XmlNodeList determinationMethodNodeList = xmlNode.SelectNodes("determinationMethod"); if (determinationMethodNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in determinationMethodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { determinationMethodIDRef = item.Attributes["id"].Name; DeterminationMethod ob = DeterminationMethod(); IDManager.SetID(determinationMethodIDRef, ob); } else if (item.Attributes.ToString() == "href") { determinationMethodIDRef = item.Attributes["href"].Name; } else { determinationMethod = new DeterminationMethod(item); } } } XmlNodeList notionalAmountNodeList = xmlNode.SelectNodes("notionalAmount"); if (notionalAmountNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in notionalAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { notionalAmountIDRef = item.Attributes["id"].Name; NotionalAmount ob = NotionalAmount(); IDManager.SetID(notionalAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { notionalAmountIDRef = item.Attributes["href"].Name; } else { notionalAmount = new NotionalAmount(item); } } } }
public ReturnSwapNotional(XmlNode xmlNode) { XmlNodeList relativeNotionalAmountNodeList = xmlNode.SelectNodes("relativeNotionalAmount"); if (relativeNotionalAmountNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in relativeNotionalAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { relativeNotionalAmountIDRef = item.Attributes["id"].Name; ReturnSwapNotionalAmountReference ob = ReturnSwapNotionalAmountReference(); IDManager.SetID(relativeNotionalAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { relativeNotionalAmountIDRef = item.Attributes["href"].Name; } else { relativeNotionalAmount = new ReturnSwapNotionalAmountReference(item); } } } XmlNodeList relativeDeterminationMethodNodeList = xmlNode.SelectNodes("relativeDeterminationMethod"); if (relativeDeterminationMethodNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in relativeDeterminationMethodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { relativeDeterminationMethodIDRef = item.Attributes["id"].Name; DeterminationMethodReference ob = DeterminationMethodReference(); IDManager.SetID(relativeDeterminationMethodIDRef, ob); } else if (item.Attributes.ToString() == "href") { relativeDeterminationMethodIDRef = item.Attributes["href"].Name; } else { relativeDeterminationMethod = new DeterminationMethodReference(item); } } } XmlNodeList determinationMethodNodeList = xmlNode.SelectNodes("determinationMethod"); if (determinationMethodNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in determinationMethodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { determinationMethodIDRef = item.Attributes["id"].Name; DeterminationMethod ob = DeterminationMethod(); IDManager.SetID(determinationMethodIDRef, ob); } else if (item.Attributes.ToString() == "href") { determinationMethodIDRef = item.Attributes["href"].Name; } else { determinationMethod = new DeterminationMethod(item); } } } XmlNodeList notionalAmountNodeList = xmlNode.SelectNodes("notionalAmount"); if (notionalAmountNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in notionalAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { notionalAmountIDRef = item.Attributes["id"].Name; NotionalAmount ob = NotionalAmount(); IDManager.SetID(notionalAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { notionalAmountIDRef = item.Attributes["href"].Name; } else { notionalAmount = new NotionalAmount(item); } } } }