public ReturnSwapLegUnderlyer(XmlNode xmlNode) : base(xmlNode) { XmlNodeList strikeDateNodeList = xmlNode.SelectNodes("strikeDate"); if (strikeDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in strikeDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { strikeDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(strikeDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { strikeDateIDRef = item.Attributes["href"].Name; } else { strikeDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList underlyerNodeList = xmlNode.SelectNodes("underlyer"); if (underlyerNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in underlyerNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { underlyerIDRef = item.Attributes["id"].Name; Underlyer ob = Underlyer(); IDManager.SetID(underlyerIDRef, ob); } else if (item.Attributes.ToString() == "href") { underlyerIDRef = item.Attributes["href"].Name; } else { underlyer = new Underlyer(item); } } } }
public CalendarSpread(XmlNode xmlNode) { XmlNodeList expirationDateTwoNodeList = xmlNode.SelectNodes("expirationDateTwo"); if (expirationDateTwoNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in expirationDateTwoNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { expirationDateTwoIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(expirationDateTwoIDRef, ob); } else if (item.Attributes.ToString() == "href") { expirationDateTwoIDRef = item.Attributes["href"].Name; } else { expirationDateTwo = new AdjustableOrRelativeDate(item); } } } }
public CalendarSpread(XmlNode xmlNode) { XmlNodeList expirationDateTwoNodeList = xmlNode.SelectNodes("expirationDateTwo"); if (expirationDateTwoNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in expirationDateTwoNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { expirationDateTwoIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(expirationDateTwoIDRef, ob); } else if (item.Attributes.ToString() == "href") { expirationDateTwoIDRef = item.Attributes["href"].Name; } else { expirationDateTwo = new AdjustableOrRelativeDate(item); } } } }
public ReturnSwapLegUnderlyer(XmlNode xmlNode) : base(xmlNode) { XmlNodeList strikeDateNodeList = xmlNode.SelectNodes("strikeDate"); if (strikeDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in strikeDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { strikeDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(strikeDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { strikeDateIDRef = item.Attributes["href"].Name; } else { strikeDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList underlyerNodeList = xmlNode.SelectNodes("underlyer"); if (underlyerNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in underlyerNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { underlyerIDRef = item.Attributes["id"].Name; Underlyer ob = Underlyer(); IDManager.SetID(underlyerIDRef, ob); } else if (item.Attributes.ToString() == "href") { underlyerIDRef = item.Attributes["href"].Name; } else { underlyer = new Underlyer(item); } } } }
public Stub(XmlNode xmlNode) : base(xmlNode) { XmlNodeList stubStartDateNodeList = xmlNode.SelectNodes("stubStartDate"); if (stubStartDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in stubStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { stubStartDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(stubStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { stubStartDateIDRef = item.Attributes["href"].Name; } else { stubStartDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList stubEndDateNodeList = xmlNode.SelectNodes("stubEndDate"); if (stubEndDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in stubEndDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { stubEndDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(stubEndDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { stubEndDateIDRef = item.Attributes["href"].Name; } else { stubEndDate = new AdjustableOrRelativeDate(item); } } } }
public CalendarSpread(XmlNode xmlNode) { XmlNode expirationDateTwoNode = xmlNode.SelectSingleNode("expirationDateTwo"); if (expirationDateTwoNode != null) { if (expirationDateTwoNode.Attributes["href"] != null || expirationDateTwoNode.Attributes["id"] != null) { if (expirationDateTwoNode.Attributes["id"] != null) { expirationDateTwoIDRef_ = expirationDateTwoNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(expirationDateTwoNode); IDManager.SetID(expirationDateTwoIDRef_, ob); } else if (expirationDateTwoNode.Attributes["href"] != null) { expirationDateTwoIDRef_ = expirationDateTwoNode.Attributes["href"].Value; } else { expirationDateTwo_ = new AdjustableOrRelativeDate(expirationDateTwoNode); } } else { expirationDateTwo_ = new AdjustableOrRelativeDate(expirationDateTwoNode); } } }
public Stub(XmlNode xmlNode) : base(xmlNode) { XmlNode stubStartDateNode = xmlNode.SelectSingleNode("stubStartDate"); if (stubStartDateNode != null) { if (stubStartDateNode.Attributes["href"] != null || stubStartDateNode.Attributes["id"] != null) { if (stubStartDateNode.Attributes["id"] != null) { stubStartDateIDRef_ = stubStartDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(stubStartDateNode); IDManager.SetID(stubStartDateIDRef_, ob); } else if (stubStartDateNode.Attributes["href"] != null) { stubStartDateIDRef_ = stubStartDateNode.Attributes["href"].Value; } else { stubStartDate_ = new AdjustableOrRelativeDate(stubStartDateNode); } } else { stubStartDate_ = new AdjustableOrRelativeDate(stubStartDateNode); } } XmlNode stubEndDateNode = xmlNode.SelectSingleNode("stubEndDate"); if (stubEndDateNode != null) { if (stubEndDateNode.Attributes["href"] != null || stubEndDateNode.Attributes["id"] != null) { if (stubEndDateNode.Attributes["id"] != null) { stubEndDateIDRef_ = stubEndDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(stubEndDateNode); IDManager.SetID(stubEndDateIDRef_, ob); } else if (stubEndDateNode.Attributes["href"] != null) { stubEndDateIDRef_ = stubEndDateNode.Attributes["href"].Value; } else { stubEndDate_ = new AdjustableOrRelativeDate(stubEndDateNode); } } else { stubEndDate_ = new AdjustableOrRelativeDate(stubEndDateNode); } } }
public CalendarSpread(XmlNode xmlNode) { XmlNode expirationDateTwoNode = xmlNode.SelectSingleNode("expirationDateTwo"); if (expirationDateTwoNode != null) { if (expirationDateTwoNode.Attributes["href"] != null || expirationDateTwoNode.Attributes["id"] != null) { if (expirationDateTwoNode.Attributes["id"] != null) { expirationDateTwoIDRef_ = expirationDateTwoNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(expirationDateTwoNode); IDManager.SetID(expirationDateTwoIDRef_, ob); } else if (expirationDateTwoNode.Attributes["href"] != null) { expirationDateTwoIDRef_ = expirationDateTwoNode.Attributes["href"].Value; } else { expirationDateTwo_ = new AdjustableOrRelativeDate(expirationDateTwoNode); } } else { expirationDateTwo_ = new AdjustableOrRelativeDate(expirationDateTwoNode); } } }
public Stub(XmlNode xmlNode) : base(xmlNode) { XmlNodeList stubStartDateNodeList = xmlNode.SelectNodes("stubStartDate"); if (stubStartDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in stubStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { stubStartDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(stubStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { stubStartDateIDRef = item.Attributes["href"].Name; } else { stubStartDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList stubEndDateNodeList = xmlNode.SelectNodes("stubEndDate"); if (stubEndDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in stubEndDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { stubEndDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(stubEndDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { stubEndDateIDRef = item.Attributes["href"].Name; } else { stubEndDate = new AdjustableOrRelativeDate(item); } } } }
public ReturnSwapLegUnderlyer(XmlNode xmlNode) : base(xmlNode) { XmlNode strikeDateNode = xmlNode.SelectSingleNode("strikeDate"); if (strikeDateNode != null) { if (strikeDateNode.Attributes["href"] != null || strikeDateNode.Attributes["id"] != null) { if (strikeDateNode.Attributes["id"] != null) { strikeDateIDRef_ = strikeDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(strikeDateNode); IDManager.SetID(strikeDateIDRef_, ob); } else if (strikeDateNode.Attributes["href"] != null) { strikeDateIDRef_ = strikeDateNode.Attributes["href"].Value; } else { strikeDate_ = new AdjustableOrRelativeDate(strikeDateNode); } } else { strikeDate_ = new AdjustableOrRelativeDate(strikeDateNode); } } XmlNode underlyerNode = xmlNode.SelectSingleNode("underlyer"); if (underlyerNode != null) { if (underlyerNode.Attributes["href"] != null || underlyerNode.Attributes["id"] != null) { if (underlyerNode.Attributes["id"] != null) { underlyerIDRef_ = underlyerNode.Attributes["id"].Value; Underlyer ob = new Underlyer(underlyerNode); IDManager.SetID(underlyerIDRef_, ob); } else if (underlyerNode.Attributes["href"] != null) { underlyerIDRef_ = underlyerNode.Attributes["href"].Value; } else { underlyer_ = new Underlyer(underlyerNode); } } else { underlyer_ = new Underlyer(underlyerNode); } } }
public CommodityExercisePeriods(XmlNode xmlNode) { XmlNode commencementDateNode = xmlNode.SelectSingleNode("commencementDate"); if (commencementDateNode != null) { if (commencementDateNode.Attributes["href"] != null || commencementDateNode.Attributes["id"] != null) { if (commencementDateNode.Attributes["id"] != null) { commencementDateIDRef_ = commencementDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(commencementDateNode); IDManager.SetID(commencementDateIDRef_, ob); } else if (commencementDateNode.Attributes["href"] != null) { commencementDateIDRef_ = commencementDateNode.Attributes["href"].Value; } else { commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode); } } else { commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode); } } XmlNode expirationDateNode = xmlNode.SelectSingleNode("expirationDate"); if (expirationDateNode != null) { if (expirationDateNode.Attributes["href"] != null || expirationDateNode.Attributes["id"] != null) { if (expirationDateNode.Attributes["id"] != null) { expirationDateIDRef_ = expirationDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(expirationDateNode); IDManager.SetID(expirationDateIDRef_, ob); } else if (expirationDateNode.Attributes["href"] != null) { expirationDateIDRef_ = expirationDateNode.Attributes["href"].Value; } else { expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode); } } else { expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode); } } }
public ReturnSwapPaymentDates(XmlNode xmlNode) { XmlNodeList paymentDatesInterimNodeList = xmlNode.SelectNodes("paymentDatesInterim"); if (paymentDatesInterimNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in paymentDatesInterimNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentDatesInterimIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDates ob = AdjustableOrRelativeDates(); IDManager.SetID(paymentDatesInterimIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentDatesInterimIDRef = item.Attributes["href"].Name; } else { paymentDatesInterim = new AdjustableOrRelativeDates(item); } } } XmlNodeList paymentDateFinalNodeList = xmlNode.SelectNodes("paymentDateFinal"); if (paymentDateFinalNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in paymentDateFinalNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentDateFinalIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(paymentDateFinalIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentDateFinalIDRef = item.Attributes["href"].Name; } else { paymentDateFinal = new AdjustableOrRelativeDate(item); } } } }
public CommodityExercisePeriods(XmlNode xmlNode) { XmlNodeList commencementDateNodeList = xmlNode.SelectNodes("commencementDate"); if (commencementDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in commencementDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { commencementDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(commencementDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { commencementDateIDRef = item.Attributes["href"].Name; } else { commencementDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList expirationDateNodeList = xmlNode.SelectNodes("expirationDate"); if (expirationDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in expirationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { expirationDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(expirationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { expirationDateIDRef = item.Attributes["href"].Name; } else { expirationDate = new AdjustableOrRelativeDate(item); } } } }
public ReturnSwapPaymentDates(XmlNode xmlNode) { XmlNode paymentDatesInterimNode = xmlNode.SelectSingleNode("paymentDatesInterim"); if (paymentDatesInterimNode != null) { if (paymentDatesInterimNode.Attributes["href"] != null || paymentDatesInterimNode.Attributes["id"] != null) { if (paymentDatesInterimNode.Attributes["id"] != null) { paymentDatesInterimIDRef_ = paymentDatesInterimNode.Attributes["id"].Value; AdjustableOrRelativeDates ob = new AdjustableOrRelativeDates(paymentDatesInterimNode); IDManager.SetID(paymentDatesInterimIDRef_, ob); } else if (paymentDatesInterimNode.Attributes["href"] != null) { paymentDatesInterimIDRef_ = paymentDatesInterimNode.Attributes["href"].Value; } else { paymentDatesInterim_ = new AdjustableOrRelativeDates(paymentDatesInterimNode); } } else { paymentDatesInterim_ = new AdjustableOrRelativeDates(paymentDatesInterimNode); } } XmlNode paymentDateFinalNode = xmlNode.SelectSingleNode("paymentDateFinal"); if (paymentDateFinalNode != null) { if (paymentDateFinalNode.Attributes["href"] != null || paymentDateFinalNode.Attributes["id"] != null) { if (paymentDateFinalNode.Attributes["id"] != null) { paymentDateFinalIDRef_ = paymentDateFinalNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(paymentDateFinalNode); IDManager.SetID(paymentDateFinalIDRef_, ob); } else if (paymentDateFinalNode.Attributes["href"] != null) { paymentDateFinalIDRef_ = paymentDateFinalNode.Attributes["href"].Value; } else { paymentDateFinal_ = new AdjustableOrRelativeDate(paymentDateFinalNode); } } else { paymentDateFinal_ = new AdjustableOrRelativeDate(paymentDateFinalNode); } } }
public CommodityExercisePeriods(XmlNode xmlNode) { XmlNodeList commencementDateNodeList = xmlNode.SelectNodes("commencementDate"); if (commencementDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in commencementDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { commencementDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(commencementDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { commencementDateIDRef = item.Attributes["href"].Name; } else { commencementDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList expirationDateNodeList = xmlNode.SelectNodes("expirationDate"); if (expirationDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in expirationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { expirationDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(expirationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { expirationDateIDRef = item.Attributes["href"].Name; } else { expirationDate = new AdjustableOrRelativeDate(item); } } } }
public ReturnSwapPaymentDates(XmlNode xmlNode) { XmlNodeList paymentDatesInterimNodeList = xmlNode.SelectNodes("paymentDatesInterim"); if (paymentDatesInterimNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in paymentDatesInterimNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentDatesInterimIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDates ob = AdjustableOrRelativeDates(); IDManager.SetID(paymentDatesInterimIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentDatesInterimIDRef = item.Attributes["href"].Name; } else { paymentDatesInterim = new AdjustableOrRelativeDates(item); } } } XmlNodeList paymentDateFinalNodeList = xmlNode.SelectNodes("paymentDateFinal"); if (paymentDateFinalNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in paymentDateFinalNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentDateFinalIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(paymentDateFinalIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentDateFinalIDRef = item.Attributes["href"].Name; } else { paymentDateFinal = new AdjustableOrRelativeDate(item); } } } }
public Stub(XmlNode xmlNode) : base(xmlNode) { XmlNode stubStartDateNode = xmlNode.SelectSingleNode("stubStartDate"); if (stubStartDateNode != null) { if (stubStartDateNode.Attributes["href"] != null || stubStartDateNode.Attributes["id"] != null) { if (stubStartDateNode.Attributes["id"] != null) { stubStartDateIDRef_ = stubStartDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(stubStartDateNode); IDManager.SetID(stubStartDateIDRef_, ob); } else if (stubStartDateNode.Attributes["href"] != null) { stubStartDateIDRef_ = stubStartDateNode.Attributes["href"].Value; } else { stubStartDate_ = new AdjustableOrRelativeDate(stubStartDateNode); } } else { stubStartDate_ = new AdjustableOrRelativeDate(stubStartDateNode); } } XmlNode stubEndDateNode = xmlNode.SelectSingleNode("stubEndDate"); if (stubEndDateNode != null) { if (stubEndDateNode.Attributes["href"] != null || stubEndDateNode.Attributes["id"] != null) { if (stubEndDateNode.Attributes["id"] != null) { stubEndDateIDRef_ = stubEndDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(stubEndDateNode); IDManager.SetID(stubEndDateIDRef_, ob); } else if (stubEndDateNode.Attributes["href"] != null) { stubEndDateIDRef_ = stubEndDateNode.Attributes["href"].Value; } else { stubEndDate_ = new AdjustableOrRelativeDate(stubEndDateNode); } } else { stubEndDate_ = new AdjustableOrRelativeDate(stubEndDateNode); } } }
public ReturnSwapLegUnderlyer(XmlNode xmlNode) : base(xmlNode) { XmlNode strikeDateNode = xmlNode.SelectSingleNode("strikeDate"); if (strikeDateNode != null) { if (strikeDateNode.Attributes["href"] != null || strikeDateNode.Attributes["id"] != null) { if (strikeDateNode.Attributes["id"] != null) { strikeDateIDRef_ = strikeDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(strikeDateNode); IDManager.SetID(strikeDateIDRef_, ob); } else if (strikeDateNode.Attributes["href"] != null) { strikeDateIDRef_ = strikeDateNode.Attributes["href"].Value; } else { strikeDate_ = new AdjustableOrRelativeDate(strikeDateNode); } } else { strikeDate_ = new AdjustableOrRelativeDate(strikeDateNode); } } XmlNode underlyerNode = xmlNode.SelectSingleNode("underlyer"); if (underlyerNode != null) { if (underlyerNode.Attributes["href"] != null || underlyerNode.Attributes["id"] != null) { if (underlyerNode.Attributes["id"] != null) { underlyerIDRef_ = underlyerNode.Attributes["id"].Value; Underlyer ob = new Underlyer(underlyerNode); IDManager.SetID(underlyerIDRef_, ob); } else if (underlyerNode.Attributes["href"] != null) { underlyerIDRef_ = underlyerNode.Attributes["href"].Value; } else { underlyer_ = new Underlyer(underlyerNode); } } else { underlyer_ = new Underlyer(underlyerNode); } } }
public CommodityExercisePeriods(XmlNode xmlNode) { XmlNode commencementDateNode = xmlNode.SelectSingleNode("commencementDate"); if (commencementDateNode != null) { if (commencementDateNode.Attributes["href"] != null || commencementDateNode.Attributes["id"] != null) { if (commencementDateNode.Attributes["id"] != null) { commencementDateIDRef_ = commencementDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(commencementDateNode); IDManager.SetID(commencementDateIDRef_, ob); } else if (commencementDateNode.Attributes["href"] != null) { commencementDateIDRef_ = commencementDateNode.Attributes["href"].Value; } else { commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode); } } else { commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode); } } XmlNode expirationDateNode = xmlNode.SelectSingleNode("expirationDate"); if (expirationDateNode != null) { if (expirationDateNode.Attributes["href"] != null || expirationDateNode.Attributes["id"] != null) { if (expirationDateNode.Attributes["id"] != null) { expirationDateIDRef_ = expirationDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(expirationDateNode); IDManager.SetID(expirationDateIDRef_, ob); } else if (expirationDateNode.Attributes["href"] != null) { expirationDateIDRef_ = expirationDateNode.Attributes["href"].Value; } else { expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode); } } else { expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode); } } }
public ReturnSwapPaymentDates(XmlNode xmlNode) { XmlNode paymentDatesInterimNode = xmlNode.SelectSingleNode("paymentDatesInterim"); if (paymentDatesInterimNode != null) { if (paymentDatesInterimNode.Attributes["href"] != null || paymentDatesInterimNode.Attributes["id"] != null) { if (paymentDatesInterimNode.Attributes["id"] != null) { paymentDatesInterimIDRef_ = paymentDatesInterimNode.Attributes["id"].Value; AdjustableOrRelativeDates ob = new AdjustableOrRelativeDates(paymentDatesInterimNode); IDManager.SetID(paymentDatesInterimIDRef_, ob); } else if (paymentDatesInterimNode.Attributes["href"] != null) { paymentDatesInterimIDRef_ = paymentDatesInterimNode.Attributes["href"].Value; } else { paymentDatesInterim_ = new AdjustableOrRelativeDates(paymentDatesInterimNode); } } else { paymentDatesInterim_ = new AdjustableOrRelativeDates(paymentDatesInterimNode); } } XmlNode paymentDateFinalNode = xmlNode.SelectSingleNode("paymentDateFinal"); if (paymentDateFinalNode != null) { if (paymentDateFinalNode.Attributes["href"] != null || paymentDateFinalNode.Attributes["id"] != null) { if (paymentDateFinalNode.Attributes["id"] != null) { paymentDateFinalIDRef_ = paymentDateFinalNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(paymentDateFinalNode); IDManager.SetID(paymentDateFinalIDRef_, ob); } else if (paymentDateFinalNode.Attributes["href"] != null) { paymentDateFinalIDRef_ = paymentDateFinalNode.Attributes["href"].Value; } else { paymentDateFinal_ = new AdjustableOrRelativeDate(paymentDateFinalNode); } } else { paymentDateFinal_ = new AdjustableOrRelativeDate(paymentDateFinalNode); } } }
public FxDigitalAmericanExercise(XmlNode xmlNode) : base(xmlNode) { XmlNode commencementDateNode = xmlNode.SelectSingleNode("commencementDate"); if (commencementDateNode != null) { if (commencementDateNode.Attributes["href"] != null || commencementDateNode.Attributes["id"] != null) { if (commencementDateNode.Attributes["id"] != null) { commencementDateIDRef_ = commencementDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(commencementDateNode); IDManager.SetID(commencementDateIDRef_, ob); } else if (commencementDateNode.Attributes["href"] != null) { commencementDateIDRef_ = commencementDateNode.Attributes["href"].Value; } else { commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode); } } else { commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode); } } XmlNode expiryDateNode = xmlNode.SelectSingleNode("expiryDate"); if (expiryDateNode != null) { if (expiryDateNode.Attributes["href"] != null || expiryDateNode.Attributes["id"] != null) { if (expiryDateNode.Attributes["id"] != null) { expiryDateIDRef_ = expiryDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(expiryDateNode); IDManager.SetID(expiryDateIDRef_, ob); } else if (expiryDateNode.Attributes["href"] != null) { expiryDateIDRef_ = expiryDateNode.Attributes["href"].Value; } else { expiryDate_ = new XsdTypeDate(expiryDateNode); } } else { expiryDate_ = new XsdTypeDate(expiryDateNode); } } XmlNode expiryTimeNode = xmlNode.SelectSingleNode("expiryTime"); if (expiryTimeNode != null) { if (expiryTimeNode.Attributes["href"] != null || expiryTimeNode.Attributes["id"] != null) { if (expiryTimeNode.Attributes["id"] != null) { expiryTimeIDRef_ = expiryTimeNode.Attributes["id"].Value; BusinessCenterTime ob = new BusinessCenterTime(expiryTimeNode); IDManager.SetID(expiryTimeIDRef_, ob); } else if (expiryTimeNode.Attributes["href"] != null) { expiryTimeIDRef_ = expiryTimeNode.Attributes["href"].Value; } else { expiryTime_ = new BusinessCenterTime(expiryTimeNode); } } else { expiryTime_ = new BusinessCenterTime(expiryTimeNode); } } XmlNode cutNameNode = xmlNode.SelectSingleNode("cutName"); if (cutNameNode != null) { if (cutNameNode.Attributes["href"] != null || cutNameNode.Attributes["id"] != null) { if (cutNameNode.Attributes["id"] != null) { cutNameIDRef_ = cutNameNode.Attributes["id"].Value; CutName ob = new CutName(cutNameNode); IDManager.SetID(cutNameIDRef_, ob); } else if (cutNameNode.Attributes["href"] != null) { cutNameIDRef_ = cutNameNode.Attributes["href"].Value; } else { cutName_ = new CutName(cutNameNode); } } else { cutName_ = new CutName(cutNameNode); } } XmlNode latestValueDateNode = xmlNode.SelectSingleNode("latestValueDate"); if (latestValueDateNode != null) { if (latestValueDateNode.Attributes["href"] != null || latestValueDateNode.Attributes["id"] != null) { if (latestValueDateNode.Attributes["id"] != null) { latestValueDateIDRef_ = latestValueDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(latestValueDateNode); IDManager.SetID(latestValueDateIDRef_, ob); } else if (latestValueDateNode.Attributes["href"] != null) { latestValueDateIDRef_ = latestValueDateNode.Attributes["href"].Value; } else { latestValueDate_ = new XsdTypeDate(latestValueDateNode); } } else { latestValueDate_ = new XsdTypeDate(latestValueDateNode); } } }
public CommoditySwaptionUnderlying(XmlNode xmlNode) { XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate"); if (effectiveDateNode != null) { if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) { if (effectiveDateNode.Attributes["id"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(effectiveDateNode); IDManager.SetID(effectiveDateIDRef_, ob); } else if (effectiveDateNode.Attributes["href"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value; } else { effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode); } } else { effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode); } } XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate"); if (terminationDateNode != null) { if (terminationDateNode.Attributes["href"] != null || terminationDateNode.Attributes["id"] != null) { if (terminationDateNode.Attributes["id"] != null) { terminationDateIDRef_ = terminationDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(terminationDateNode); IDManager.SetID(terminationDateIDRef_, ob); } else if (terminationDateNode.Attributes["href"] != null) { terminationDateIDRef_ = terminationDateNode.Attributes["href"].Value; } else { terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode); } } else { terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode); } } XmlNode settlementCurrencyNode = xmlNode.SelectSingleNode("settlementCurrency"); if (settlementCurrencyNode != null) { if (settlementCurrencyNode.Attributes["href"] != null || settlementCurrencyNode.Attributes["id"] != null) { if (settlementCurrencyNode.Attributes["id"] != null) { settlementCurrencyIDRef_ = settlementCurrencyNode.Attributes["id"].Value; IdentifiedCurrency ob = new IdentifiedCurrency(settlementCurrencyNode); IDManager.SetID(settlementCurrencyIDRef_, ob); } else if (settlementCurrencyNode.Attributes["href"] != null) { settlementCurrencyIDRef_ = settlementCurrencyNode.Attributes["href"].Value; } else { settlementCurrency_ = new IdentifiedCurrency(settlementCurrencyNode); } } else { settlementCurrency_ = new IdentifiedCurrency(settlementCurrencyNode); } } XmlNode commoditySwapLegNode = xmlNode.SelectSingleNode("commoditySwapLeg"); if (commoditySwapLegNode != null) { if (commoditySwapLegNode.Attributes["href"] != null || commoditySwapLegNode.Attributes["id"] != null) { if (commoditySwapLegNode.Attributes["id"] != null) { commoditySwapLegIDRef_ = commoditySwapLegNode.Attributes["id"].Value; CommoditySwapLeg ob = new CommoditySwapLeg(commoditySwapLegNode); IDManager.SetID(commoditySwapLegIDRef_, ob); } else if (commoditySwapLegNode.Attributes["href"] != null) { commoditySwapLegIDRef_ = commoditySwapLegNode.Attributes["href"].Value; } else { commoditySwapLeg_ = new CommoditySwapLeg(commoditySwapLegNode); } } else { commoditySwapLeg_ = new CommoditySwapLeg(commoditySwapLegNode); } } XmlNode coalPhysicalLegNode = xmlNode.SelectSingleNode("coalPhysicalLeg"); if (coalPhysicalLegNode != null) { if (coalPhysicalLegNode.Attributes["href"] != null || coalPhysicalLegNode.Attributes["id"] != null) { if (coalPhysicalLegNode.Attributes["id"] != null) { coalPhysicalLegIDRef_ = coalPhysicalLegNode.Attributes["id"].Value; CoalPhysicalLeg ob = new CoalPhysicalLeg(coalPhysicalLegNode); IDManager.SetID(coalPhysicalLegIDRef_, ob); } else if (coalPhysicalLegNode.Attributes["href"] != null) { coalPhysicalLegIDRef_ = coalPhysicalLegNode.Attributes["href"].Value; } else { coalPhysicalLeg_ = new CoalPhysicalLeg(coalPhysicalLegNode); } } else { coalPhysicalLeg_ = new CoalPhysicalLeg(coalPhysicalLegNode); } } XmlNode electricityPhysicalLegNode = xmlNode.SelectSingleNode("electricityPhysicalLeg"); if (electricityPhysicalLegNode != null) { if (electricityPhysicalLegNode.Attributes["href"] != null || electricityPhysicalLegNode.Attributes["id"] != null) { if (electricityPhysicalLegNode.Attributes["id"] != null) { electricityPhysicalLegIDRef_ = electricityPhysicalLegNode.Attributes["id"].Value; ElectricityPhysicalLeg ob = new ElectricityPhysicalLeg(electricityPhysicalLegNode); IDManager.SetID(electricityPhysicalLegIDRef_, ob); } else if (electricityPhysicalLegNode.Attributes["href"] != null) { electricityPhysicalLegIDRef_ = electricityPhysicalLegNode.Attributes["href"].Value; } else { electricityPhysicalLeg_ = new ElectricityPhysicalLeg(electricityPhysicalLegNode); } } else { electricityPhysicalLeg_ = new ElectricityPhysicalLeg(electricityPhysicalLegNode); } } XmlNode environmentalPhysicalLegNode = xmlNode.SelectSingleNode("environmentalPhysicalLeg"); if (environmentalPhysicalLegNode != null) { if (environmentalPhysicalLegNode.Attributes["href"] != null || environmentalPhysicalLegNode.Attributes["id"] != null) { if (environmentalPhysicalLegNode.Attributes["id"] != null) { environmentalPhysicalLegIDRef_ = environmentalPhysicalLegNode.Attributes["id"].Value; EnvironmentalPhysicalLeg ob = new EnvironmentalPhysicalLeg(environmentalPhysicalLegNode); IDManager.SetID(environmentalPhysicalLegIDRef_, ob); } else if (environmentalPhysicalLegNode.Attributes["href"] != null) { environmentalPhysicalLegIDRef_ = environmentalPhysicalLegNode.Attributes["href"].Value; } else { environmentalPhysicalLeg_ = new EnvironmentalPhysicalLeg(environmentalPhysicalLegNode); } } else { environmentalPhysicalLeg_ = new EnvironmentalPhysicalLeg(environmentalPhysicalLegNode); } } XmlNode fixedLegNode = xmlNode.SelectSingleNode("fixedLeg"); if (fixedLegNode != null) { if (fixedLegNode.Attributes["href"] != null || fixedLegNode.Attributes["id"] != null) { if (fixedLegNode.Attributes["id"] != null) { fixedLegIDRef_ = fixedLegNode.Attributes["id"].Value; FixedPriceLeg ob = new FixedPriceLeg(fixedLegNode); IDManager.SetID(fixedLegIDRef_, ob); } else if (fixedLegNode.Attributes["href"] != null) { fixedLegIDRef_ = fixedLegNode.Attributes["href"].Value; } else { fixedLeg_ = new FixedPriceLeg(fixedLegNode); } } else { fixedLeg_ = new FixedPriceLeg(fixedLegNode); } } XmlNode floatingLegNode = xmlNode.SelectSingleNode("floatingLeg"); if (floatingLegNode != null) { if (floatingLegNode.Attributes["href"] != null || floatingLegNode.Attributes["id"] != null) { if (floatingLegNode.Attributes["id"] != null) { floatingLegIDRef_ = floatingLegNode.Attributes["id"].Value; FloatingPriceLeg ob = new FloatingPriceLeg(floatingLegNode); IDManager.SetID(floatingLegIDRef_, ob); } else if (floatingLegNode.Attributes["href"] != null) { floatingLegIDRef_ = floatingLegNode.Attributes["href"].Value; } else { floatingLeg_ = new FloatingPriceLeg(floatingLegNode); } } else { floatingLeg_ = new FloatingPriceLeg(floatingLegNode); } } XmlNode gasPhysicalLegNode = xmlNode.SelectSingleNode("gasPhysicalLeg"); if (gasPhysicalLegNode != null) { if (gasPhysicalLegNode.Attributes["href"] != null || gasPhysicalLegNode.Attributes["id"] != null) { if (gasPhysicalLegNode.Attributes["id"] != null) { gasPhysicalLegIDRef_ = gasPhysicalLegNode.Attributes["id"].Value; GasPhysicalLeg ob = new GasPhysicalLeg(gasPhysicalLegNode); IDManager.SetID(gasPhysicalLegIDRef_, ob); } else if (gasPhysicalLegNode.Attributes["href"] != null) { gasPhysicalLegIDRef_ = gasPhysicalLegNode.Attributes["href"].Value; } else { gasPhysicalLeg_ = new GasPhysicalLeg(gasPhysicalLegNode); } } else { gasPhysicalLeg_ = new GasPhysicalLeg(gasPhysicalLegNode); } } XmlNode oilPhysicalLegNode = xmlNode.SelectSingleNode("oilPhysicalLeg"); if (oilPhysicalLegNode != null) { if (oilPhysicalLegNode.Attributes["href"] != null || oilPhysicalLegNode.Attributes["id"] != null) { if (oilPhysicalLegNode.Attributes["id"] != null) { oilPhysicalLegIDRef_ = oilPhysicalLegNode.Attributes["id"].Value; OilPhysicalLeg ob = new OilPhysicalLeg(oilPhysicalLegNode); IDManager.SetID(oilPhysicalLegIDRef_, ob); } else if (oilPhysicalLegNode.Attributes["href"] != null) { oilPhysicalLegIDRef_ = oilPhysicalLegNode.Attributes["href"].Value; } else { oilPhysicalLeg_ = new OilPhysicalLeg(oilPhysicalLegNode); } } else { oilPhysicalLeg_ = new OilPhysicalLeg(oilPhysicalLegNode); } } XmlNodeList weatherLegNodeList = xmlNode.SelectNodes("weatherLeg"); if (weatherLegNodeList != null) { this.weatherLeg_ = new List <WeatherLeg>(); foreach (XmlNode item in weatherLegNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { weatherLegIDRef_ = item.Attributes["id"].Value; weatherLeg_.Add(new WeatherLeg(item)); IDManager.SetID(weatherLegIDRef_, weatherLeg_[weatherLeg_.Count - 1]); } else if (item.Attributes["href"] != null) { weatherLegIDRef_ = item.Attributes["href"].Value; } else { weatherLeg_.Add(new WeatherLeg(item)); } } else { weatherLeg_.Add(new WeatherLeg(item)); } } } XmlNode commonPricingNode = xmlNode.SelectSingleNode("commonPricing"); if (commonPricingNode != null) { if (commonPricingNode.Attributes["href"] != null || commonPricingNode.Attributes["id"] != null) { if (commonPricingNode.Attributes["id"] != null) { commonPricingIDRef_ = commonPricingNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(commonPricingNode); IDManager.SetID(commonPricingIDRef_, ob); } else if (commonPricingNode.Attributes["href"] != null) { commonPricingIDRef_ = commonPricingNode.Attributes["href"].Value; } else { commonPricing_ = new XsdTypeBoolean(commonPricingNode); } } else { commonPricing_ = new XsdTypeBoolean(commonPricingNode); } } XmlNode marketDisruptionNode = xmlNode.SelectSingleNode("marketDisruption"); if (marketDisruptionNode != null) { if (marketDisruptionNode.Attributes["href"] != null || marketDisruptionNode.Attributes["id"] != null) { if (marketDisruptionNode.Attributes["id"] != null) { marketDisruptionIDRef_ = marketDisruptionNode.Attributes["id"].Value; CommodityMarketDisruption ob = new CommodityMarketDisruption(marketDisruptionNode); IDManager.SetID(marketDisruptionIDRef_, ob); } else if (marketDisruptionNode.Attributes["href"] != null) { marketDisruptionIDRef_ = marketDisruptionNode.Attributes["href"].Value; } else { marketDisruption_ = new CommodityMarketDisruption(marketDisruptionNode); } } else { marketDisruption_ = new CommodityMarketDisruption(marketDisruptionNode); } } XmlNode settlementDisruptionNode = xmlNode.SelectSingleNode("settlementDisruption"); if (settlementDisruptionNode != null) { if (settlementDisruptionNode.Attributes["href"] != null || settlementDisruptionNode.Attributes["id"] != null) { if (settlementDisruptionNode.Attributes["id"] != null) { settlementDisruptionIDRef_ = settlementDisruptionNode.Attributes["id"].Value; CommodityBullionSettlementDisruptionEnum ob = new CommodityBullionSettlementDisruptionEnum(settlementDisruptionNode); IDManager.SetID(settlementDisruptionIDRef_, ob); } else if (settlementDisruptionNode.Attributes["href"] != null) { settlementDisruptionIDRef_ = settlementDisruptionNode.Attributes["href"].Value; } else { settlementDisruption_ = new CommodityBullionSettlementDisruptionEnum(settlementDisruptionNode); } } else { settlementDisruption_ = new CommodityBullionSettlementDisruptionEnum(settlementDisruptionNode); } } XmlNode roundingNode = xmlNode.SelectSingleNode("rounding"); if (roundingNode != null) { if (roundingNode.Attributes["href"] != null || roundingNode.Attributes["id"] != null) { if (roundingNode.Attributes["id"] != null) { roundingIDRef_ = roundingNode.Attributes["id"].Value; Rounding ob = new Rounding(roundingNode); IDManager.SetID(roundingIDRef_, ob); } else if (roundingNode.Attributes["href"] != null) { roundingIDRef_ = roundingNode.Attributes["href"].Value; } else { rounding_ = new Rounding(roundingNode); } } else { rounding_ = new Rounding(roundingNode); } } }
public CommodityEuropeanExercise(XmlNode xmlNode) : base(xmlNode) { XmlNodeList expirationDateNodeList = xmlNode.SelectNodes("expirationDate"); if (expirationDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in expirationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { expirationDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(expirationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { expirationDateIDRef = item.Attributes["href"].Name; } else { expirationDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList exerciseFrequencyNodeList = xmlNode.SelectNodes("exerciseFrequency"); if (exerciseFrequencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in exerciseFrequencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { exerciseFrequencyIDRef = item.Attributes["id"].Name; Frequency ob = Frequency(); IDManager.SetID(exerciseFrequencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { exerciseFrequencyIDRef = item.Attributes["href"].Name; } else { exerciseFrequency = new Frequency(item); } } } XmlNodeList expirationTimeNodeList = xmlNode.SelectNodes("expirationTime"); if (expirationTimeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in expirationTimeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { expirationTimeIDRef = item.Attributes["id"].Name; BusinessCenterTime ob = BusinessCenterTime(); IDManager.SetID(expirationTimeIDRef, ob); } else if (item.Attributes.ToString() == "href") { expirationTimeIDRef = item.Attributes["href"].Name; } else { expirationTime = new BusinessCenterTime(item); } } } }
public SimplePayment(XmlNode xmlNode) : base(xmlNode) { XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference"); if (payerPartyReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in payerPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { payerPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(payerPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { payerPartyReferenceIDRef = item.Attributes["href"].Name; } else { payerPartyReference = new PartyReference(item); } } } XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference"); if (payerAccountReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in payerAccountReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { payerAccountReferenceIDRef = item.Attributes["id"].Name; AccountReference ob = AccountReference(); IDManager.SetID(payerAccountReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { payerAccountReferenceIDRef = item.Attributes["href"].Name; } else { payerAccountReference = new AccountReference(item); } } } XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference"); if (receiverPartyReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in receiverPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { receiverPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(receiverPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { receiverPartyReferenceIDRef = item.Attributes["href"].Name; } else { receiverPartyReference = new PartyReference(item); } } } XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference"); if (receiverAccountReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in receiverAccountReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { receiverAccountReferenceIDRef = item.Attributes["id"].Name; AccountReference ob = AccountReference(); IDManager.SetID(receiverAccountReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { receiverAccountReferenceIDRef = item.Attributes["href"].Name; } else { receiverAccountReference = new AccountReference(item); } } } XmlNodeList paymentAmountNodeList = xmlNode.SelectNodes("paymentAmount"); if (paymentAmountNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in paymentAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentAmountIDRef = item.Attributes["id"].Name; NonNegativeMoney ob = NonNegativeMoney(); IDManager.SetID(paymentAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentAmountIDRef = item.Attributes["href"].Name; } else { paymentAmount = new NonNegativeMoney(item); } } } XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate"); if (paymentDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in paymentDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(paymentDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentDateIDRef = item.Attributes["href"].Name; } else { paymentDate = new AdjustableOrRelativeDate(item); } } } }
public DividendPeriodPayment(XmlNode xmlNode) : base(xmlNode) { XmlNode fixedStrikeNode = xmlNode.SelectSingleNode("fixedStrike"); if (fixedStrikeNode != null) { if (fixedStrikeNode.Attributes["href"] != null || fixedStrikeNode.Attributes["id"] != null) { if (fixedStrikeNode.Attributes["id"] != null) { fixedStrikeIDRef_ = fixedStrikeNode.Attributes["id"].Value; PositiveDecimal ob = new PositiveDecimal(fixedStrikeNode); IDManager.SetID(fixedStrikeIDRef_, ob); } else if (fixedStrikeNode.Attributes["href"] != null) { fixedStrikeIDRef_ = fixedStrikeNode.Attributes["href"].Value; } else { fixedStrike_ = new PositiveDecimal(fixedStrikeNode); } } else { fixedStrike_ = new PositiveDecimal(fixedStrikeNode); } } XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate"); if (paymentDateNode != null) { if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null) { if (paymentDateNode.Attributes["id"] != null) { paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(paymentDateNode); IDManager.SetID(paymentDateIDRef_, ob); } else if (paymentDateNode.Attributes["href"] != null) { paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value; } else { paymentDate_ = new AdjustableOrRelativeDate(paymentDateNode); } } else { paymentDate_ = new AdjustableOrRelativeDate(paymentDateNode); } } XmlNode valuationDateNode = xmlNode.SelectSingleNode("valuationDate"); if (valuationDateNode != null) { if (valuationDateNode.Attributes["href"] != null || valuationDateNode.Attributes["id"] != null) { if (valuationDateNode.Attributes["id"] != null) { valuationDateIDRef_ = valuationDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(valuationDateNode); IDManager.SetID(valuationDateIDRef_, ob); } else if (valuationDateNode.Attributes["href"] != null) { valuationDateIDRef_ = valuationDateNode.Attributes["href"].Value; } else { valuationDate_ = new AdjustableOrRelativeDate(valuationDateNode); } } else { valuationDate_ = new AdjustableOrRelativeDate(valuationDateNode); } } }
public PeriodicDates(XmlNode xmlNode) { XmlNodeList calculationStartDateNodeList = xmlNode.SelectNodes("calculationStartDate"); if (calculationStartDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in calculationStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationStartDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(calculationStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationStartDateIDRef = item.Attributes["href"].Name; } else { calculationStartDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList calculationEndDateNodeList = xmlNode.SelectNodes("calculationEndDate"); if (calculationEndDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in calculationEndDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationEndDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(calculationEndDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationEndDateIDRef = item.Attributes["href"].Name; } else { calculationEndDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList calculationPeriodFrequencyNodeList = xmlNode.SelectNodes("calculationPeriodFrequency"); if (calculationPeriodFrequencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in calculationPeriodFrequencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodFrequencyIDRef = item.Attributes["id"].Name; CalculationPeriodFrequency ob = CalculationPeriodFrequency(); IDManager.SetID(calculationPeriodFrequencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodFrequencyIDRef = item.Attributes["href"].Name; } else { calculationPeriodFrequency = new CalculationPeriodFrequency(item); } } } XmlNodeList calculationPeriodDatesAdjustmentsNodeList = xmlNode.SelectNodes("calculationPeriodDatesAdjustments"); if (calculationPeriodDatesAdjustmentsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in calculationPeriodDatesAdjustmentsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodDatesAdjustmentsIDRef = item.Attributes["id"].Name; BusinessDayAdjustments ob = BusinessDayAdjustments(); IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodDatesAdjustmentsIDRef = item.Attributes["href"].Name; } else { calculationPeriodDatesAdjustments = new BusinessDayAdjustments(item); } } } }
public PeriodicDates(XmlNode xmlNode) { XmlNodeList calculationStartDateNodeList = xmlNode.SelectNodes("calculationStartDate"); if (calculationStartDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationStartDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(calculationStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationStartDateIDRef = item.Attributes["href"].Name; } else { calculationStartDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList calculationEndDateNodeList = xmlNode.SelectNodes("calculationEndDate"); if (calculationEndDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationEndDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationEndDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(calculationEndDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationEndDateIDRef = item.Attributes["href"].Name; } else { calculationEndDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList calculationPeriodFrequencyNodeList = xmlNode.SelectNodes("calculationPeriodFrequency"); if (calculationPeriodFrequencyNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationPeriodFrequencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodFrequencyIDRef = item.Attributes["id"].Name; CalculationPeriodFrequency ob = CalculationPeriodFrequency(); IDManager.SetID(calculationPeriodFrequencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodFrequencyIDRef = item.Attributes["href"].Name; } else { calculationPeriodFrequency = new CalculationPeriodFrequency(item); } } } XmlNodeList calculationPeriodDatesAdjustmentsNodeList = xmlNode.SelectNodes("calculationPeriodDatesAdjustments"); if (calculationPeriodDatesAdjustmentsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationPeriodDatesAdjustmentsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodDatesAdjustmentsIDRef = item.Attributes["id"].Name; BusinessDayAdjustments ob = BusinessDayAdjustments(); IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodDatesAdjustmentsIDRef = item.Attributes["href"].Name; } else { calculationPeriodDatesAdjustments = new BusinessDayAdjustments(item); } } } }
public CommodityForward(XmlNode xmlNode) : base(xmlNode) { XmlNodeList valueDateNodeList = xmlNode.SelectNodes("valueDate"); if (valueDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in valueDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { valueDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(valueDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { valueDateIDRef = item.Attributes["href"].Name; } else { valueDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList fixedLegNodeList = xmlNode.SelectNodes("fixedLeg"); if (fixedLegNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in fixedLegNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { fixedLegIDRef = item.Attributes["id"].Name; NonPeriodicFixedPriceLeg ob = NonPeriodicFixedPriceLeg(); IDManager.SetID(fixedLegIDRef, ob); } else if (item.Attributes.ToString() == "href") { fixedLegIDRef = item.Attributes["href"].Name; } else { fixedLeg = new NonPeriodicFixedPriceLeg(item); } } } XmlNodeList averagePriceLegNodeList = xmlNode.SelectNodes("averagePriceLeg"); if (averagePriceLegNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in averagePriceLegNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { averagePriceLegIDRef = item.Attributes["id"].Name; AveragePriceLeg ob = AveragePriceLeg(); IDManager.SetID(averagePriceLegIDRef, ob); } else if (item.Attributes.ToString() == "href") { averagePriceLegIDRef = item.Attributes["href"].Name; } else { averagePriceLeg = new AveragePriceLeg(item); } } } XmlNodeList commodityForwardLegNodeList = xmlNode.SelectNodes("commodityForwardLeg"); if (commodityForwardLegNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in commodityForwardLegNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { commodityForwardLegIDRef = item.Attributes["id"].Name; CommodityForwardLeg ob = CommodityForwardLeg(); IDManager.SetID(commodityForwardLegIDRef, ob); } else if (item.Attributes.ToString() == "href") { commodityForwardLegIDRef = item.Attributes["href"].Name; } else { commodityForwardLeg = new CommodityForwardLeg(item); } } } XmlNodeList bullionPhysicalLegNodeList = xmlNode.SelectNodes("bullionPhysicalLeg"); if (bullionPhysicalLegNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in bullionPhysicalLegNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { bullionPhysicalLegIDRef = item.Attributes["id"].Name; BullionPhysicalLeg ob = BullionPhysicalLeg(); IDManager.SetID(bullionPhysicalLegIDRef, ob); } else if (item.Attributes.ToString() == "href") { bullionPhysicalLegIDRef = item.Attributes["href"].Name; } else { bullionPhysicalLeg = new BullionPhysicalLeg(item); } } } XmlNodeList metalPhysicalLegNodeList = xmlNode.SelectNodes("metalPhysicalLeg"); if (metalPhysicalLegNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in metalPhysicalLegNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { metalPhysicalLegIDRef = item.Attributes["id"].Name; MetalPhysicalLeg ob = MetalPhysicalLeg(); IDManager.SetID(metalPhysicalLegIDRef, ob); } else if (item.Attributes.ToString() == "href") { metalPhysicalLegIDRef = item.Attributes["href"].Name; } else { metalPhysicalLeg = new MetalPhysicalLeg(item); } } } XmlNodeList commonPricingNodeList = xmlNode.SelectNodes("commonPricing"); if (commonPricingNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in commonPricingNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { commonPricingIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(commonPricingIDRef, ob); } else if (item.Attributes.ToString() == "href") { commonPricingIDRef = item.Attributes["href"].Name; } else { commonPricing = new XsdTypeBoolean(item); } } } XmlNodeList marketDisruptionNodeList = xmlNode.SelectNodes("marketDisruption"); if (marketDisruptionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in marketDisruptionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { marketDisruptionIDRef = item.Attributes["id"].Name; CommodityMarketDisruption ob = CommodityMarketDisruption(); IDManager.SetID(marketDisruptionIDRef, ob); } else if (item.Attributes.ToString() == "href") { marketDisruptionIDRef = item.Attributes["href"].Name; } else { marketDisruption = new CommodityMarketDisruption(item); } } } XmlNodeList settlementDisruptionNodeList = xmlNode.SelectNodes("settlementDisruption"); if (settlementDisruptionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in settlementDisruptionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { settlementDisruptionIDRef = item.Attributes["id"].Name; CommodityBullionSettlementDisruptionEnum ob = CommodityBullionSettlementDisruptionEnum(); IDManager.SetID(settlementDisruptionIDRef, ob); } else if (item.Attributes.ToString() == "href") { settlementDisruptionIDRef = item.Attributes["href"].Name; } else { settlementDisruption = new CommodityBullionSettlementDisruptionEnum(item); } } } XmlNodeList roundingNodeList = xmlNode.SelectNodes("rounding"); if (roundingNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in roundingNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { roundingIDRef = item.Attributes["id"].Name; Rounding ob = Rounding(); IDManager.SetID(roundingIDRef, ob); } else if (item.Attributes.ToString() == "href") { roundingIDRef = item.Attributes["href"].Name; } else { rounding = new Rounding(item); } } } }
public PaymentBaseExtended(XmlNode xmlNode) : base(xmlNode) { XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference"); if (payerPartyReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in payerPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { payerPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(payerPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { payerPartyReferenceIDRef = item.Attributes["href"].Name; } else { payerPartyReference = new PartyReference(item); } } } XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference"); if (payerAccountReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in payerAccountReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { payerAccountReferenceIDRef = item.Attributes["id"].Name; AccountReference ob = AccountReference(); IDManager.SetID(payerAccountReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { payerAccountReferenceIDRef = item.Attributes["href"].Name; } else { payerAccountReference = new AccountReference(item); } } } XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference"); if (receiverPartyReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in receiverPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { receiverPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(receiverPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { receiverPartyReferenceIDRef = item.Attributes["href"].Name; } else { receiverPartyReference = new PartyReference(item); } } } XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference"); if (receiverAccountReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in receiverAccountReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { receiverAccountReferenceIDRef = item.Attributes["id"].Name; AccountReference ob = AccountReference(); IDManager.SetID(receiverAccountReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { receiverAccountReferenceIDRef = item.Attributes["href"].Name; } else { receiverAccountReference = new AccountReference(item); } } } XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate"); if (paymentDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in paymentDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(paymentDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentDateIDRef = item.Attributes["href"].Name; } else { paymentDate = new AdjustableOrRelativeDate(item); } } } }
public InterestLegCalculationPeriodDates(XmlNode xmlNode) { XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate"); if (effectiveDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in effectiveDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { effectiveDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(effectiveDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { effectiveDateIDRef = item.Attributes["href"].Name; } else { effectiveDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList terminationDateNodeList = xmlNode.SelectNodes("terminationDate"); if (terminationDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in terminationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { terminationDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(terminationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { terminationDateIDRef = item.Attributes["href"].Name; } else { terminationDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList interestLegResetDatesNodeList = xmlNode.SelectNodes("interestLegResetDates"); if (interestLegResetDatesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in interestLegResetDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { interestLegResetDatesIDRef = item.Attributes["id"].Name; InterestLegResetDates ob = InterestLegResetDates(); IDManager.SetID(interestLegResetDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { interestLegResetDatesIDRef = item.Attributes["href"].Name; } else { interestLegResetDates = new InterestLegResetDates(item); } } } XmlNodeList interestLegPaymentDatesNodeList = xmlNode.SelectNodes("interestLegPaymentDates"); if (interestLegPaymentDatesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in interestLegPaymentDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { interestLegPaymentDatesIDRef = item.Attributes["id"].Name; AdjustableRelativeOrPeriodicDates2 ob = AdjustableRelativeOrPeriodicDates2(); IDManager.SetID(interestLegPaymentDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { interestLegPaymentDatesIDRef = item.Attributes["href"].Name; } else { interestLegPaymentDates = new AdjustableRelativeOrPeriodicDates2(item); } } } }
public CommodityPhysicalEuropeanExercise(XmlNode xmlNode) : base(xmlNode) { XmlNode expirationDateNode = xmlNode.SelectSingleNode("expirationDate"); if (expirationDateNode != null) { if (expirationDateNode.Attributes["href"] != null || expirationDateNode.Attributes["id"] != null) { if (expirationDateNode.Attributes["id"] != null) { expirationDateIDRef_ = expirationDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(expirationDateNode); IDManager.SetID(expirationDateIDRef_, ob); } else if (expirationDateNode.Attributes["href"] != null) { expirationDateIDRef_ = expirationDateNode.Attributes["href"].Value; } else { expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode); } } else { expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode); } } XmlNode expirationDatesNode = xmlNode.SelectSingleNode("expirationDates"); if (expirationDatesNode != null) { if (expirationDatesNode.Attributes["href"] != null || expirationDatesNode.Attributes["id"] != null) { if (expirationDatesNode.Attributes["id"] != null) { expirationDatesIDRef_ = expirationDatesNode.Attributes["id"].Value; AdjustableRelativeOrPeriodicDates2 ob = new AdjustableRelativeOrPeriodicDates2(expirationDatesNode); IDManager.SetID(expirationDatesIDRef_, ob); } else if (expirationDatesNode.Attributes["href"] != null) { expirationDatesIDRef_ = expirationDatesNode.Attributes["href"].Value; } else { expirationDates_ = new AdjustableRelativeOrPeriodicDates2(expirationDatesNode); } } else { expirationDates_ = new AdjustableRelativeOrPeriodicDates2(expirationDatesNode); } } XmlNode relativeExpirationDatesNode = xmlNode.SelectSingleNode("relativeExpirationDates"); if (relativeExpirationDatesNode != null) { if (relativeExpirationDatesNode.Attributes["href"] != null || relativeExpirationDatesNode.Attributes["id"] != null) { if (relativeExpirationDatesNode.Attributes["id"] != null) { relativeExpirationDatesIDRef_ = relativeExpirationDatesNode.Attributes["id"].Value; CommodityRelativeExpirationDates ob = new CommodityRelativeExpirationDates(relativeExpirationDatesNode); IDManager.SetID(relativeExpirationDatesIDRef_, ob); } else if (relativeExpirationDatesNode.Attributes["href"] != null) { relativeExpirationDatesIDRef_ = relativeExpirationDatesNode.Attributes["href"].Value; } else { relativeExpirationDates_ = new CommodityRelativeExpirationDates(relativeExpirationDatesNode); } } else { relativeExpirationDates_ = new CommodityRelativeExpirationDates(relativeExpirationDatesNode); } } XmlNode expirationTimeNode = xmlNode.SelectSingleNode("expirationTime"); if (expirationTimeNode != null) { if (expirationTimeNode.Attributes["href"] != null || expirationTimeNode.Attributes["id"] != null) { if (expirationTimeNode.Attributes["id"] != null) { expirationTimeIDRef_ = expirationTimeNode.Attributes["id"].Value; PrevailingTime ob = new PrevailingTime(expirationTimeNode); IDManager.SetID(expirationTimeIDRef_, ob); } else if (expirationTimeNode.Attributes["href"] != null) { expirationTimeIDRef_ = expirationTimeNode.Attributes["href"].Value; } else { expirationTime_ = new PrevailingTime(expirationTimeNode); } } else { expirationTime_ = new PrevailingTime(expirationTimeNode); } } }
public FxDigitalAmericanExercise(XmlNode xmlNode) : base(xmlNode) { XmlNode commencementDateNode = xmlNode.SelectSingleNode("commencementDate"); if (commencementDateNode != null) { if (commencementDateNode.Attributes["href"] != null || commencementDateNode.Attributes["id"] != null) { if (commencementDateNode.Attributes["id"] != null) { commencementDateIDRef_ = commencementDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(commencementDateNode); IDManager.SetID(commencementDateIDRef_, ob); } else if (commencementDateNode.Attributes["href"] != null) { commencementDateIDRef_ = commencementDateNode.Attributes["href"].Value; } else { commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode); } } else { commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode); } } XmlNode expiryDateNode = xmlNode.SelectSingleNode("expiryDate"); if (expiryDateNode != null) { if (expiryDateNode.Attributes["href"] != null || expiryDateNode.Attributes["id"] != null) { if (expiryDateNode.Attributes["id"] != null) { expiryDateIDRef_ = expiryDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(expiryDateNode); IDManager.SetID(expiryDateIDRef_, ob); } else if (expiryDateNode.Attributes["href"] != null) { expiryDateIDRef_ = expiryDateNode.Attributes["href"].Value; } else { expiryDate_ = new XsdTypeDate(expiryDateNode); } } else { expiryDate_ = new XsdTypeDate(expiryDateNode); } } XmlNode expiryTimeNode = xmlNode.SelectSingleNode("expiryTime"); if (expiryTimeNode != null) { if (expiryTimeNode.Attributes["href"] != null || expiryTimeNode.Attributes["id"] != null) { if (expiryTimeNode.Attributes["id"] != null) { expiryTimeIDRef_ = expiryTimeNode.Attributes["id"].Value; BusinessCenterTime ob = new BusinessCenterTime(expiryTimeNode); IDManager.SetID(expiryTimeIDRef_, ob); } else if (expiryTimeNode.Attributes["href"] != null) { expiryTimeIDRef_ = expiryTimeNode.Attributes["href"].Value; } else { expiryTime_ = new BusinessCenterTime(expiryTimeNode); } } else { expiryTime_ = new BusinessCenterTime(expiryTimeNode); } } XmlNode cutNameNode = xmlNode.SelectSingleNode("cutName"); if (cutNameNode != null) { if (cutNameNode.Attributes["href"] != null || cutNameNode.Attributes["id"] != null) { if (cutNameNode.Attributes["id"] != null) { cutNameIDRef_ = cutNameNode.Attributes["id"].Value; CutName ob = new CutName(cutNameNode); IDManager.SetID(cutNameIDRef_, ob); } else if (cutNameNode.Attributes["href"] != null) { cutNameIDRef_ = cutNameNode.Attributes["href"].Value; } else { cutName_ = new CutName(cutNameNode); } } else { cutName_ = new CutName(cutNameNode); } } XmlNode latestValueDateNode = xmlNode.SelectSingleNode("latestValueDate"); if (latestValueDateNode != null) { if (latestValueDateNode.Attributes["href"] != null || latestValueDateNode.Attributes["id"] != null) { if (latestValueDateNode.Attributes["id"] != null) { latestValueDateIDRef_ = latestValueDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(latestValueDateNode); IDManager.SetID(latestValueDateIDRef_, ob); } else if (latestValueDateNode.Attributes["href"] != null) { latestValueDateIDRef_ = latestValueDateNode.Attributes["href"].Value; } else { latestValueDate_ = new XsdTypeDate(latestValueDateNode); } } else { latestValueDate_ = new XsdTypeDate(latestValueDateNode); } } }
public OptionBaseExtended(XmlNode xmlNode) : base(xmlNode) { XmlNode premiumNode = xmlNode.SelectSingleNode("premium"); if (premiumNode != null) { if (premiumNode.Attributes["href"] != null || premiumNode.Attributes["id"] != null) { if (premiumNode.Attributes["id"] != null) { premiumIDRef_ = premiumNode.Attributes["id"].Value; Premium ob = new Premium(premiumNode); IDManager.SetID(premiumIDRef_, ob); } else if (premiumNode.Attributes["href"] != null) { premiumIDRef_ = premiumNode.Attributes["href"].Value; } else { premium_ = new Premium(premiumNode); } } else { premium_ = new Premium(premiumNode); } } XmlNode exerciseNode = xmlNode.SelectSingleNode("exercise"); if (exerciseNode != null) { if (exerciseNode.Attributes["href"] != null || exerciseNode.Attributes["id"] != null) { if (exerciseNode.Attributes["id"] != null) { exerciseIDRef_ = exerciseNode.Attributes["id"].Value; Exercise ob = new Exercise(exerciseNode); IDManager.SetID(exerciseIDRef_, ob); } else if (exerciseNode.Attributes["href"] != null) { exerciseIDRef_ = exerciseNode.Attributes["href"].Value; } else { exercise_ = new Exercise(exerciseNode); } } else { exercise_ = new Exercise(exerciseNode); } } XmlNode americanExerciseNode = xmlNode.SelectSingleNode("americanExercise"); if (americanExerciseNode != null) { if (americanExerciseNode.Attributes["href"] != null || americanExerciseNode.Attributes["id"] != null) { if (americanExerciseNode.Attributes["id"] != null) { americanExerciseIDRef_ = americanExerciseNode.Attributes["id"].Value; AmericanExercise ob = new AmericanExercise(americanExerciseNode); IDManager.SetID(americanExerciseIDRef_, ob); } else if (americanExerciseNode.Attributes["href"] != null) { americanExerciseIDRef_ = americanExerciseNode.Attributes["href"].Value; } else { americanExercise_ = new AmericanExercise(americanExerciseNode); } } else { americanExercise_ = new AmericanExercise(americanExerciseNode); } } XmlNode bermudaExerciseNode = xmlNode.SelectSingleNode("bermudaExercise"); if (bermudaExerciseNode != null) { if (bermudaExerciseNode.Attributes["href"] != null || bermudaExerciseNode.Attributes["id"] != null) { if (bermudaExerciseNode.Attributes["id"] != null) { bermudaExerciseIDRef_ = bermudaExerciseNode.Attributes["id"].Value; BermudaExercise ob = new BermudaExercise(bermudaExerciseNode); IDManager.SetID(bermudaExerciseIDRef_, ob); } else if (bermudaExerciseNode.Attributes["href"] != null) { bermudaExerciseIDRef_ = bermudaExerciseNode.Attributes["href"].Value; } else { bermudaExercise_ = new BermudaExercise(bermudaExerciseNode); } } else { bermudaExercise_ = new BermudaExercise(bermudaExerciseNode); } } XmlNode europeanExerciseNode = xmlNode.SelectSingleNode("europeanExercise"); if (europeanExerciseNode != null) { if (europeanExerciseNode.Attributes["href"] != null || europeanExerciseNode.Attributes["id"] != null) { if (europeanExerciseNode.Attributes["id"] != null) { europeanExerciseIDRef_ = europeanExerciseNode.Attributes["id"].Value; EuropeanExercise ob = new EuropeanExercise(europeanExerciseNode); IDManager.SetID(europeanExerciseIDRef_, ob); } else if (europeanExerciseNode.Attributes["href"] != null) { europeanExerciseIDRef_ = europeanExerciseNode.Attributes["href"].Value; } else { europeanExercise_ = new EuropeanExercise(europeanExerciseNode); } } else { europeanExercise_ = new EuropeanExercise(europeanExerciseNode); } } XmlNode exerciseProcedureNode = xmlNode.SelectSingleNode("exerciseProcedure"); if (exerciseProcedureNode != null) { if (exerciseProcedureNode.Attributes["href"] != null || exerciseProcedureNode.Attributes["id"] != null) { if (exerciseProcedureNode.Attributes["id"] != null) { exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["id"].Value; ExerciseProcedure ob = new ExerciseProcedure(exerciseProcedureNode); IDManager.SetID(exerciseProcedureIDRef_, ob); } else if (exerciseProcedureNode.Attributes["href"] != null) { exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["href"].Value; } else { exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode); } } else { exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode); } } XmlNode featureNode = xmlNode.SelectSingleNode("feature"); if (featureNode != null) { if (featureNode.Attributes["href"] != null || featureNode.Attributes["id"] != null) { if (featureNode.Attributes["id"] != null) { featureIDRef_ = featureNode.Attributes["id"].Value; OptionFeature ob = new OptionFeature(featureNode); IDManager.SetID(featureIDRef_, ob); } else if (featureNode.Attributes["href"] != null) { featureIDRef_ = featureNode.Attributes["href"].Value; } else { feature_ = new OptionFeature(featureNode); } } else { feature_ = new OptionFeature(featureNode); } } XmlNode notionalReferenceNode = xmlNode.SelectSingleNode("notionalReference"); if (notionalReferenceNode != null) { if (notionalReferenceNode.Attributes["href"] != null || notionalReferenceNode.Attributes["id"] != null) { if (notionalReferenceNode.Attributes["id"] != null) { notionalReferenceIDRef_ = notionalReferenceNode.Attributes["id"].Value; NotionalAmountReference ob = new NotionalAmountReference(notionalReferenceNode); IDManager.SetID(notionalReferenceIDRef_, ob); } else if (notionalReferenceNode.Attributes["href"] != null) { notionalReferenceIDRef_ = notionalReferenceNode.Attributes["href"].Value; } else { notionalReference_ = new NotionalAmountReference(notionalReferenceNode); } } else { notionalReference_ = new NotionalAmountReference(notionalReferenceNode); } } 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; Money ob = new Money(notionalAmountNode); IDManager.SetID(notionalAmountIDRef_, ob); } else if (notionalAmountNode.Attributes["href"] != null) { notionalAmountIDRef_ = notionalAmountNode.Attributes["href"].Value; } else { notionalAmount_ = new Money(notionalAmountNode); } } else { notionalAmount_ = new Money(notionalAmountNode); } } XmlNode optionEntitlementNode = xmlNode.SelectSingleNode("optionEntitlement"); if (optionEntitlementNode != null) { if (optionEntitlementNode.Attributes["href"] != null || optionEntitlementNode.Attributes["id"] != null) { if (optionEntitlementNode.Attributes["id"] != null) { optionEntitlementIDRef_ = optionEntitlementNode.Attributes["id"].Value; PositiveDecimal ob = new PositiveDecimal(optionEntitlementNode); IDManager.SetID(optionEntitlementIDRef_, ob); } else if (optionEntitlementNode.Attributes["href"] != null) { optionEntitlementIDRef_ = optionEntitlementNode.Attributes["href"].Value; } else { optionEntitlement_ = new PositiveDecimal(optionEntitlementNode); } } else { optionEntitlement_ = new PositiveDecimal(optionEntitlementNode); } } XmlNode entitlementCurrencyNode = xmlNode.SelectSingleNode("entitlementCurrency"); if (entitlementCurrencyNode != null) { if (entitlementCurrencyNode.Attributes["href"] != null || entitlementCurrencyNode.Attributes["id"] != null) { if (entitlementCurrencyNode.Attributes["id"] != null) { entitlementCurrencyIDRef_ = entitlementCurrencyNode.Attributes["id"].Value; Currency ob = new Currency(entitlementCurrencyNode); IDManager.SetID(entitlementCurrencyIDRef_, ob); } else if (entitlementCurrencyNode.Attributes["href"] != null) { entitlementCurrencyIDRef_ = entitlementCurrencyNode.Attributes["href"].Value; } else { entitlementCurrency_ = new Currency(entitlementCurrencyNode); } } else { entitlementCurrency_ = new Currency(entitlementCurrencyNode); } } XmlNode numberOfOptionsNode = xmlNode.SelectSingleNode("numberOfOptions"); if (numberOfOptionsNode != null) { if (numberOfOptionsNode.Attributes["href"] != null || numberOfOptionsNode.Attributes["id"] != null) { if (numberOfOptionsNode.Attributes["id"] != null) { numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["id"].Value; PositiveDecimal ob = new PositiveDecimal(numberOfOptionsNode); IDManager.SetID(numberOfOptionsIDRef_, ob); } else if (numberOfOptionsNode.Attributes["href"] != null) { numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["href"].Value; } else { numberOfOptions_ = new PositiveDecimal(numberOfOptionsNode); } } else { numberOfOptions_ = new PositiveDecimal(numberOfOptionsNode); } } XmlNode settlementTypeNode = xmlNode.SelectSingleNode("settlementType"); if (settlementTypeNode != null) { if (settlementTypeNode.Attributes["href"] != null || settlementTypeNode.Attributes["id"] != null) { if (settlementTypeNode.Attributes["id"] != null) { settlementTypeIDRef_ = settlementTypeNode.Attributes["id"].Value; SettlementTypeEnum ob = new SettlementTypeEnum(settlementTypeNode); IDManager.SetID(settlementTypeIDRef_, ob); } else if (settlementTypeNode.Attributes["href"] != null) { settlementTypeIDRef_ = settlementTypeNode.Attributes["href"].Value; } else { settlementType_ = new SettlementTypeEnum(settlementTypeNode); } } else { settlementType_ = new SettlementTypeEnum(settlementTypeNode); } } XmlNode settlementDateNode = xmlNode.SelectSingleNode("settlementDate"); if (settlementDateNode != null) { if (settlementDateNode.Attributes["href"] != null || settlementDateNode.Attributes["id"] != null) { if (settlementDateNode.Attributes["id"] != null) { settlementDateIDRef_ = settlementDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(settlementDateNode); IDManager.SetID(settlementDateIDRef_, ob); } else if (settlementDateNode.Attributes["href"] != null) { settlementDateIDRef_ = settlementDateNode.Attributes["href"].Value; } else { settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode); } } else { settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode); } } XmlNode settlementAmountNode = xmlNode.SelectSingleNode("settlementAmount"); if (settlementAmountNode != null) { if (settlementAmountNode.Attributes["href"] != null || settlementAmountNode.Attributes["id"] != null) { if (settlementAmountNode.Attributes["id"] != null) { settlementAmountIDRef_ = settlementAmountNode.Attributes["id"].Value; Money ob = new Money(settlementAmountNode); IDManager.SetID(settlementAmountIDRef_, ob); } else if (settlementAmountNode.Attributes["href"] != null) { settlementAmountIDRef_ = settlementAmountNode.Attributes["href"].Value; } else { settlementAmount_ = new Money(settlementAmountNode); } } else { settlementAmount_ = new Money(settlementAmountNode); } } XmlNode settlementCurrencyNode = xmlNode.SelectSingleNode("settlementCurrency"); if (settlementCurrencyNode != null) { if (settlementCurrencyNode.Attributes["href"] != null || settlementCurrencyNode.Attributes["id"] != null) { if (settlementCurrencyNode.Attributes["id"] != null) { settlementCurrencyIDRef_ = settlementCurrencyNode.Attributes["id"].Value; Currency ob = new Currency(settlementCurrencyNode); IDManager.SetID(settlementCurrencyIDRef_, ob); } else if (settlementCurrencyNode.Attributes["href"] != null) { settlementCurrencyIDRef_ = settlementCurrencyNode.Attributes["href"].Value; } else { settlementCurrency_ = new Currency(settlementCurrencyNode); } } else { settlementCurrency_ = new Currency(settlementCurrencyNode); } } }
public AmericanExercise(XmlNode xmlNode) : base(xmlNode) { XmlNode commencementDateNode = xmlNode.SelectSingleNode("commencementDate"); if (commencementDateNode != null) { if (commencementDateNode.Attributes["href"] != null || commencementDateNode.Attributes["id"] != null) { if (commencementDateNode.Attributes["id"] != null) { commencementDateIDRef_ = commencementDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(commencementDateNode); IDManager.SetID(commencementDateIDRef_, ob); } else if (commencementDateNode.Attributes["href"] != null) { commencementDateIDRef_ = commencementDateNode.Attributes["href"].Value; } else { commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode); } } else { commencementDate_ = new AdjustableOrRelativeDate(commencementDateNode); } } XmlNode expirationDateNode = xmlNode.SelectSingleNode("expirationDate"); if (expirationDateNode != null) { if (expirationDateNode.Attributes["href"] != null || expirationDateNode.Attributes["id"] != null) { if (expirationDateNode.Attributes["id"] != null) { expirationDateIDRef_ = expirationDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(expirationDateNode); IDManager.SetID(expirationDateIDRef_, ob); } else if (expirationDateNode.Attributes["href"] != null) { expirationDateIDRef_ = expirationDateNode.Attributes["href"].Value; } else { expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode); } } else { expirationDate_ = new AdjustableOrRelativeDate(expirationDateNode); } } XmlNode relevantUnderlyingDateNode = xmlNode.SelectSingleNode("relevantUnderlyingDate"); if (relevantUnderlyingDateNode != null) { if (relevantUnderlyingDateNode.Attributes["href"] != null || relevantUnderlyingDateNode.Attributes["id"] != null) { if (relevantUnderlyingDateNode.Attributes["id"] != null) { relevantUnderlyingDateIDRef_ = relevantUnderlyingDateNode.Attributes["id"].Value; AdjustableOrRelativeDates ob = new AdjustableOrRelativeDates(relevantUnderlyingDateNode); IDManager.SetID(relevantUnderlyingDateIDRef_, ob); } else if (relevantUnderlyingDateNode.Attributes["href"] != null) { relevantUnderlyingDateIDRef_ = relevantUnderlyingDateNode.Attributes["href"].Value; } else { relevantUnderlyingDate_ = new AdjustableOrRelativeDates(relevantUnderlyingDateNode); } } else { relevantUnderlyingDate_ = new AdjustableOrRelativeDates(relevantUnderlyingDateNode); } } XmlNode earliestExerciseTimeNode = xmlNode.SelectSingleNode("earliestExerciseTime"); if (earliestExerciseTimeNode != null) { if (earliestExerciseTimeNode.Attributes["href"] != null || earliestExerciseTimeNode.Attributes["id"] != null) { if (earliestExerciseTimeNode.Attributes["id"] != null) { earliestExerciseTimeIDRef_ = earliestExerciseTimeNode.Attributes["id"].Value; BusinessCenterTime ob = new BusinessCenterTime(earliestExerciseTimeNode); IDManager.SetID(earliestExerciseTimeIDRef_, ob); } else if (earliestExerciseTimeNode.Attributes["href"] != null) { earliestExerciseTimeIDRef_ = earliestExerciseTimeNode.Attributes["href"].Value; } else { earliestExerciseTime_ = new BusinessCenterTime(earliestExerciseTimeNode); } } else { earliestExerciseTime_ = new BusinessCenterTime(earliestExerciseTimeNode); } } XmlNode latestExerciseTimeNode = xmlNode.SelectSingleNode("latestExerciseTime"); if (latestExerciseTimeNode != null) { if (latestExerciseTimeNode.Attributes["href"] != null || latestExerciseTimeNode.Attributes["id"] != null) { if (latestExerciseTimeNode.Attributes["id"] != null) { latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["id"].Value; BusinessCenterTime ob = new BusinessCenterTime(latestExerciseTimeNode); IDManager.SetID(latestExerciseTimeIDRef_, ob); } else if (latestExerciseTimeNode.Attributes["href"] != null) { latestExerciseTimeIDRef_ = latestExerciseTimeNode.Attributes["href"].Value; } else { latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode); } } else { latestExerciseTime_ = new BusinessCenterTime(latestExerciseTimeNode); } } XmlNode expirationTimeNode = xmlNode.SelectSingleNode("expirationTime"); if (expirationTimeNode != null) { if (expirationTimeNode.Attributes["href"] != null || expirationTimeNode.Attributes["id"] != null) { if (expirationTimeNode.Attributes["id"] != null) { expirationTimeIDRef_ = expirationTimeNode.Attributes["id"].Value; BusinessCenterTime ob = new BusinessCenterTime(expirationTimeNode); IDManager.SetID(expirationTimeIDRef_, ob); } else if (expirationTimeNode.Attributes["href"] != null) { expirationTimeIDRef_ = expirationTimeNode.Attributes["href"].Value; } else { expirationTime_ = new BusinessCenterTime(expirationTimeNode); } } else { expirationTime_ = new BusinessCenterTime(expirationTimeNode); } } XmlNode multipleExerciseNode = xmlNode.SelectSingleNode("multipleExercise"); if (multipleExerciseNode != null) { if (multipleExerciseNode.Attributes["href"] != null || multipleExerciseNode.Attributes["id"] != null) { if (multipleExerciseNode.Attributes["id"] != null) { multipleExerciseIDRef_ = multipleExerciseNode.Attributes["id"].Value; MultipleExercise ob = new MultipleExercise(multipleExerciseNode); IDManager.SetID(multipleExerciseIDRef_, ob); } else if (multipleExerciseNode.Attributes["href"] != null) { multipleExerciseIDRef_ = multipleExerciseNode.Attributes["href"].Value; } else { multipleExercise_ = new MultipleExercise(multipleExerciseNode); } } else { multipleExercise_ = new MultipleExercise(multipleExerciseNode); } } XmlNode exerciseFeeScheduleNode = xmlNode.SelectSingleNode("exerciseFeeSchedule"); if (exerciseFeeScheduleNode != null) { if (exerciseFeeScheduleNode.Attributes["href"] != null || exerciseFeeScheduleNode.Attributes["id"] != null) { if (exerciseFeeScheduleNode.Attributes["id"] != null) { exerciseFeeScheduleIDRef_ = exerciseFeeScheduleNode.Attributes["id"].Value; ExerciseFeeSchedule ob = new ExerciseFeeSchedule(exerciseFeeScheduleNode); IDManager.SetID(exerciseFeeScheduleIDRef_, ob); } else if (exerciseFeeScheduleNode.Attributes["href"] != null) { exerciseFeeScheduleIDRef_ = exerciseFeeScheduleNode.Attributes["href"].Value; } else { exerciseFeeSchedule_ = new ExerciseFeeSchedule(exerciseFeeScheduleNode); } } else { exerciseFeeSchedule_ = new ExerciseFeeSchedule(exerciseFeeScheduleNode); } } }
public OptionBaseExtended(XmlNode xmlNode) : base(xmlNode) { XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium"); if (premiumNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in premiumNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { premiumIDRef = item.Attributes["id"].Name; Premium ob = Premium(); IDManager.SetID(premiumIDRef, ob); } else if (item.Attributes.ToString() == "href") { premiumIDRef = item.Attributes["href"].Name; } else { premium = new Premium(item); } } } XmlNodeList exerciseNodeList = xmlNode.SelectNodes("exercise"); if (exerciseNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in exerciseNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { exerciseIDRef = item.Attributes["id"].Name; Exercise ob = Exercise(); IDManager.SetID(exerciseIDRef, ob); } else if (item.Attributes.ToString() == "href") { exerciseIDRef = item.Attributes["href"].Name; } else { exercise = new Exercise(item); } } } XmlNodeList americanExerciseNodeList = xmlNode.SelectNodes("americanExercise"); if (americanExerciseNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in americanExerciseNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { americanExerciseIDRef = item.Attributes["id"].Name; AmericanExercise ob = AmericanExercise(); IDManager.SetID(americanExerciseIDRef, ob); } else if (item.Attributes.ToString() == "href") { americanExerciseIDRef = item.Attributes["href"].Name; } else { americanExercise = new AmericanExercise(item); } } } XmlNodeList bermudaExerciseNodeList = xmlNode.SelectNodes("bermudaExercise"); if (bermudaExerciseNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in bermudaExerciseNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { bermudaExerciseIDRef = item.Attributes["id"].Name; BermudaExercise ob = BermudaExercise(); IDManager.SetID(bermudaExerciseIDRef, ob); } else if (item.Attributes.ToString() == "href") { bermudaExerciseIDRef = item.Attributes["href"].Name; } else { bermudaExercise = new BermudaExercise(item); } } } XmlNodeList europeanExerciseNodeList = xmlNode.SelectNodes("europeanExercise"); if (europeanExerciseNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in europeanExerciseNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { europeanExerciseIDRef = item.Attributes["id"].Name; EuropeanExercise ob = EuropeanExercise(); IDManager.SetID(europeanExerciseIDRef, ob); } else if (item.Attributes.ToString() == "href") { europeanExerciseIDRef = item.Attributes["href"].Name; } else { europeanExercise = new EuropeanExercise(item); } } } XmlNodeList exerciseProcedureNodeList = xmlNode.SelectNodes("exerciseProcedure"); if (exerciseProcedureNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in exerciseProcedureNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { exerciseProcedureIDRef = item.Attributes["id"].Name; ExerciseProcedure ob = ExerciseProcedure(); IDManager.SetID(exerciseProcedureIDRef, ob); } else if (item.Attributes.ToString() == "href") { exerciseProcedureIDRef = item.Attributes["href"].Name; } else { exerciseProcedure = new ExerciseProcedure(item); } } } XmlNodeList featureNodeList = xmlNode.SelectNodes("feature"); if (featureNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in featureNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { featureIDRef = item.Attributes["id"].Name; OptionFeature ob = OptionFeature(); IDManager.SetID(featureIDRef, ob); } else if (item.Attributes.ToString() == "href") { featureIDRef = item.Attributes["href"].Name; } else { feature = new OptionFeature(item); } } } XmlNodeList notionalReferenceNodeList = xmlNode.SelectNodes("notionalReference"); if (notionalReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in notionalReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { notionalReferenceIDRef = item.Attributes["id"].Name; NotionalAmountReference ob = NotionalAmountReference(); IDManager.SetID(notionalReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { notionalReferenceIDRef = item.Attributes["href"].Name; } else { notionalReference = new NotionalAmountReference(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; Money ob = Money(); IDManager.SetID(notionalAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { notionalAmountIDRef = item.Attributes["href"].Name; } else { notionalAmount = new Money(item); } } } XmlNodeList optionEntitlementNodeList = xmlNode.SelectNodes("optionEntitlement"); if (optionEntitlementNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in optionEntitlementNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { optionEntitlementIDRef = item.Attributes["id"].Name; PositiveDecimal ob = PositiveDecimal(); IDManager.SetID(optionEntitlementIDRef, ob); } else if (item.Attributes.ToString() == "href") { optionEntitlementIDRef = item.Attributes["href"].Name; } else { optionEntitlement = new PositiveDecimal(item); } } } XmlNodeList entitlementCurrencyNodeList = xmlNode.SelectNodes("entitlementCurrency"); if (entitlementCurrencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in entitlementCurrencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { entitlementCurrencyIDRef = item.Attributes["id"].Name; Currency ob = Currency(); IDManager.SetID(entitlementCurrencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { entitlementCurrencyIDRef = item.Attributes["href"].Name; } else { entitlementCurrency = new Currency(item); } } } XmlNodeList numberOfOptionsNodeList = xmlNode.SelectNodes("numberOfOptions"); if (numberOfOptionsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in numberOfOptionsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { numberOfOptionsIDRef = item.Attributes["id"].Name; PositiveDecimal ob = PositiveDecimal(); IDManager.SetID(numberOfOptionsIDRef, ob); } else if (item.Attributes.ToString() == "href") { numberOfOptionsIDRef = item.Attributes["href"].Name; } else { numberOfOptions = new PositiveDecimal(item); } } } XmlNodeList settlementTypeNodeList = xmlNode.SelectNodes("settlementType"); if (settlementTypeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in settlementTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { settlementTypeIDRef = item.Attributes["id"].Name; SettlementTypeEnum ob = SettlementTypeEnum(); IDManager.SetID(settlementTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { settlementTypeIDRef = item.Attributes["href"].Name; } else { settlementType = new SettlementTypeEnum(item); } } } XmlNodeList settlementDateNodeList = xmlNode.SelectNodes("settlementDate"); if (settlementDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in settlementDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { settlementDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(settlementDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { settlementDateIDRef = item.Attributes["href"].Name; } else { settlementDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList settlementAmountNodeList = xmlNode.SelectNodes("settlementAmount"); if (settlementAmountNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in settlementAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { settlementAmountIDRef = item.Attributes["id"].Name; Money ob = Money(); IDManager.SetID(settlementAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { settlementAmountIDRef = item.Attributes["href"].Name; } else { settlementAmount = new Money(item); } } } XmlNodeList settlementCurrencyNodeList = xmlNode.SelectNodes("settlementCurrency"); if (settlementCurrencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in settlementCurrencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { settlementCurrencyIDRef = item.Attributes["id"].Name; Currency ob = Currency(); IDManager.SetID(settlementCurrencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { settlementCurrencyIDRef = item.Attributes["href"].Name; } else { settlementCurrency = new Currency(item); } } } }
public FxDigitalAmericanExercise(XmlNode xmlNode) : base(xmlNode) { XmlNodeList commencementDateNodeList = xmlNode.SelectNodes("commencementDate"); if (commencementDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in commencementDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { commencementDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(commencementDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { commencementDateIDRef = item.Attributes["href"].Name; } else { commencementDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList expiryDateNodeList = xmlNode.SelectNodes("expiryDate"); if (expiryDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in expiryDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { expiryDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(expiryDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { expiryDateIDRef = item.Attributes["href"].Name; } else { expiryDate = new XsdTypeDate(item); } } } XmlNodeList expiryTimeNodeList = xmlNode.SelectNodes("expiryTime"); if (expiryTimeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in expiryTimeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { expiryTimeIDRef = item.Attributes["id"].Name; BusinessCenterTime ob = BusinessCenterTime(); IDManager.SetID(expiryTimeIDRef, ob); } else if (item.Attributes.ToString() == "href") { expiryTimeIDRef = item.Attributes["href"].Name; } else { expiryTime = new BusinessCenterTime(item); } } } XmlNodeList cutNameNodeList = xmlNode.SelectNodes("cutName"); if (cutNameNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in cutNameNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { cutNameIDRef = item.Attributes["id"].Name; CutName ob = CutName(); IDManager.SetID(cutNameIDRef, ob); } else if (item.Attributes.ToString() == "href") { cutNameIDRef = item.Attributes["href"].Name; } else { cutName = new CutName(item); } } } XmlNodeList latestValueDateNodeList = xmlNode.SelectNodes("latestValueDate"); if (latestValueDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in latestValueDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { latestValueDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(latestValueDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { latestValueDateIDRef = item.Attributes["href"].Name; } else { latestValueDate = new XsdTypeDate(item); } } } }
public CalculatedAmount(XmlNode xmlNode) { XmlNode calculationDatesNode = xmlNode.SelectSingleNode("calculationDates"); if (calculationDatesNode != null) { if (calculationDatesNode.Attributes["href"] != null || calculationDatesNode.Attributes["id"] != null) { if (calculationDatesNode.Attributes["id"] != null) { calculationDatesIDRef_ = calculationDatesNode.Attributes["id"].Value; AdjustableRelativeOrPeriodicDates ob = new AdjustableRelativeOrPeriodicDates(calculationDatesNode); IDManager.SetID(calculationDatesIDRef_, ob); } else if (calculationDatesNode.Attributes["href"] != null) { calculationDatesIDRef_ = calculationDatesNode.Attributes["href"].Value; } else { calculationDates_ = new AdjustableRelativeOrPeriodicDates(calculationDatesNode); } } else { calculationDates_ = new AdjustableRelativeOrPeriodicDates(calculationDatesNode); } } XmlNode observationStartDateNode = xmlNode.SelectSingleNode("observationStartDate"); if (observationStartDateNode != null) { if (observationStartDateNode.Attributes["href"] != null || observationStartDateNode.Attributes["id"] != null) { if (observationStartDateNode.Attributes["id"] != null) { observationStartDateIDRef_ = observationStartDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(observationStartDateNode); IDManager.SetID(observationStartDateIDRef_, ob); } else if (observationStartDateNode.Attributes["href"] != null) { observationStartDateIDRef_ = observationStartDateNode.Attributes["href"].Value; } else { observationStartDate_ = new AdjustableOrRelativeDate(observationStartDateNode); } } else { observationStartDate_ = new AdjustableOrRelativeDate(observationStartDateNode); } } XmlNode optionsExchangeDividendsNode = xmlNode.SelectSingleNode("optionsExchangeDividends"); if (optionsExchangeDividendsNode != null) { if (optionsExchangeDividendsNode.Attributes["href"] != null || optionsExchangeDividendsNode.Attributes["id"] != null) { if (optionsExchangeDividendsNode.Attributes["id"] != null) { optionsExchangeDividendsIDRef_ = optionsExchangeDividendsNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(optionsExchangeDividendsNode); IDManager.SetID(optionsExchangeDividendsIDRef_, ob); } else if (optionsExchangeDividendsNode.Attributes["href"] != null) { optionsExchangeDividendsIDRef_ = optionsExchangeDividendsNode.Attributes["href"].Value; } else { optionsExchangeDividends_ = new XsdTypeBoolean(optionsExchangeDividendsNode); } } else { optionsExchangeDividends_ = new XsdTypeBoolean(optionsExchangeDividendsNode); } } XmlNode additionalDividendsNode = xmlNode.SelectSingleNode("additionalDividends"); if (additionalDividendsNode != null) { if (additionalDividendsNode.Attributes["href"] != null || additionalDividendsNode.Attributes["id"] != null) { if (additionalDividendsNode.Attributes["id"] != null) { additionalDividendsIDRef_ = additionalDividendsNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(additionalDividendsNode); IDManager.SetID(additionalDividendsIDRef_, ob); } else if (additionalDividendsNode.Attributes["href"] != null) { additionalDividendsIDRef_ = additionalDividendsNode.Attributes["href"].Value; } else { additionalDividends_ = new XsdTypeBoolean(additionalDividendsNode); } } else { additionalDividends_ = new XsdTypeBoolean(additionalDividendsNode); } } XmlNode allDividendsNode = xmlNode.SelectSingleNode("allDividends"); if (allDividendsNode != null) { if (allDividendsNode.Attributes["href"] != null || allDividendsNode.Attributes["id"] != null) { if (allDividendsNode.Attributes["id"] != null) { allDividendsIDRef_ = allDividendsNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(allDividendsNode); IDManager.SetID(allDividendsIDRef_, ob); } else if (allDividendsNode.Attributes["href"] != null) { allDividendsIDRef_ = allDividendsNode.Attributes["href"].Value; } else { allDividends_ = new XsdTypeBoolean(allDividendsNode); } } else { allDividends_ = new XsdTypeBoolean(allDividendsNode); } } }
public InterestLegCalculationPeriodDates(XmlNode xmlNode) { XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate"); if (effectiveDateNode != null) { if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) { if (effectiveDateNode.Attributes["id"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(effectiveDateNode); IDManager.SetID(effectiveDateIDRef_, ob); } else if (effectiveDateNode.Attributes["href"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value; } else { effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode); } } else { effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode); } } XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate"); if (terminationDateNode != null) { if (terminationDateNode.Attributes["href"] != null || terminationDateNode.Attributes["id"] != null) { if (terminationDateNode.Attributes["id"] != null) { terminationDateIDRef_ = terminationDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(terminationDateNode); IDManager.SetID(terminationDateIDRef_, ob); } else if (terminationDateNode.Attributes["href"] != null) { terminationDateIDRef_ = terminationDateNode.Attributes["href"].Value; } else { terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode); } } else { terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode); } } XmlNode interestLegResetDatesNode = xmlNode.SelectSingleNode("interestLegResetDates"); if (interestLegResetDatesNode != null) { if (interestLegResetDatesNode.Attributes["href"] != null || interestLegResetDatesNode.Attributes["id"] != null) { if (interestLegResetDatesNode.Attributes["id"] != null) { interestLegResetDatesIDRef_ = interestLegResetDatesNode.Attributes["id"].Value; InterestLegResetDates ob = new InterestLegResetDates(interestLegResetDatesNode); IDManager.SetID(interestLegResetDatesIDRef_, ob); } else if (interestLegResetDatesNode.Attributes["href"] != null) { interestLegResetDatesIDRef_ = interestLegResetDatesNode.Attributes["href"].Value; } else { interestLegResetDates_ = new InterestLegResetDates(interestLegResetDatesNode); } } else { interestLegResetDates_ = new InterestLegResetDates(interestLegResetDatesNode); } } XmlNode interestLegPaymentDatesNode = xmlNode.SelectSingleNode("interestLegPaymentDates"); if (interestLegPaymentDatesNode != null) { if (interestLegPaymentDatesNode.Attributes["href"] != null || interestLegPaymentDatesNode.Attributes["id"] != null) { if (interestLegPaymentDatesNode.Attributes["id"] != null) { interestLegPaymentDatesIDRef_ = interestLegPaymentDatesNode.Attributes["id"].Value; AdjustableRelativeOrPeriodicDates2 ob = new AdjustableRelativeOrPeriodicDates2(interestLegPaymentDatesNode); IDManager.SetID(interestLegPaymentDatesIDRef_, ob); } else if (interestLegPaymentDatesNode.Attributes["href"] != null) { interestLegPaymentDatesIDRef_ = interestLegPaymentDatesNode.Attributes["href"].Value; } else { interestLegPaymentDates_ = new AdjustableRelativeOrPeriodicDates2(interestLegPaymentDatesNode); } } else { interestLegPaymentDates_ = new AdjustableRelativeOrPeriodicDates2(interestLegPaymentDatesNode); } } }
public EquityExerciseValuationSettlement(XmlNode xmlNode) { XmlNode equityEuropeanExerciseNode = xmlNode.SelectSingleNode("equityEuropeanExercise"); if (equityEuropeanExerciseNode != null) { if (equityEuropeanExerciseNode.Attributes["href"] != null || equityEuropeanExerciseNode.Attributes["id"] != null) { if (equityEuropeanExerciseNode.Attributes["id"] != null) { equityEuropeanExerciseIDRef_ = equityEuropeanExerciseNode.Attributes["id"].Value; EquityEuropeanExercise ob = new EquityEuropeanExercise(equityEuropeanExerciseNode); IDManager.SetID(equityEuropeanExerciseIDRef_, ob); } else if (equityEuropeanExerciseNode.Attributes["href"] != null) { equityEuropeanExerciseIDRef_ = equityEuropeanExerciseNode.Attributes["href"].Value; } else { equityEuropeanExercise_ = new EquityEuropeanExercise(equityEuropeanExerciseNode); } } else { equityEuropeanExercise_ = new EquityEuropeanExercise(equityEuropeanExerciseNode); } } XmlNode equityAmericanExerciseNode = xmlNode.SelectSingleNode("equityAmericanExercise"); if (equityAmericanExerciseNode != null) { if (equityAmericanExerciseNode.Attributes["href"] != null || equityAmericanExerciseNode.Attributes["id"] != null) { if (equityAmericanExerciseNode.Attributes["id"] != null) { equityAmericanExerciseIDRef_ = equityAmericanExerciseNode.Attributes["id"].Value; EquityAmericanExercise ob = new EquityAmericanExercise(equityAmericanExerciseNode); IDManager.SetID(equityAmericanExerciseIDRef_, ob); } else if (equityAmericanExerciseNode.Attributes["href"] != null) { equityAmericanExerciseIDRef_ = equityAmericanExerciseNode.Attributes["href"].Value; } else { equityAmericanExercise_ = new EquityAmericanExercise(equityAmericanExerciseNode); } } else { equityAmericanExercise_ = new EquityAmericanExercise(equityAmericanExerciseNode); } } XmlNode equityBermudaExerciseNode = xmlNode.SelectSingleNode("equityBermudaExercise"); if (equityBermudaExerciseNode != null) { if (equityBermudaExerciseNode.Attributes["href"] != null || equityBermudaExerciseNode.Attributes["id"] != null) { if (equityBermudaExerciseNode.Attributes["id"] != null) { equityBermudaExerciseIDRef_ = equityBermudaExerciseNode.Attributes["id"].Value; EquityBermudaExercise ob = new EquityBermudaExercise(equityBermudaExerciseNode); IDManager.SetID(equityBermudaExerciseIDRef_, ob); } else if (equityBermudaExerciseNode.Attributes["href"] != null) { equityBermudaExerciseIDRef_ = equityBermudaExerciseNode.Attributes["href"].Value; } else { equityBermudaExercise_ = new EquityBermudaExercise(equityBermudaExerciseNode); } } else { equityBermudaExercise_ = new EquityBermudaExercise(equityBermudaExerciseNode); } } XmlNode automaticExerciseNode = xmlNode.SelectSingleNode("automaticExercise"); if (automaticExerciseNode != null) { if (automaticExerciseNode.Attributes["href"] != null || automaticExerciseNode.Attributes["id"] != null) { if (automaticExerciseNode.Attributes["id"] != null) { automaticExerciseIDRef_ = automaticExerciseNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(automaticExerciseNode); IDManager.SetID(automaticExerciseIDRef_, ob); } else if (automaticExerciseNode.Attributes["href"] != null) { automaticExerciseIDRef_ = automaticExerciseNode.Attributes["href"].Value; } else { automaticExercise_ = new XsdTypeBoolean(automaticExerciseNode); } } else { automaticExercise_ = new XsdTypeBoolean(automaticExerciseNode); } } XmlNode makeWholeProvisionsNode = xmlNode.SelectSingleNode("makeWholeProvisions"); if (makeWholeProvisionsNode != null) { if (makeWholeProvisionsNode.Attributes["href"] != null || makeWholeProvisionsNode.Attributes["id"] != null) { if (makeWholeProvisionsNode.Attributes["id"] != null) { makeWholeProvisionsIDRef_ = makeWholeProvisionsNode.Attributes["id"].Value; MakeWholeProvisions ob = new MakeWholeProvisions(makeWholeProvisionsNode); IDManager.SetID(makeWholeProvisionsIDRef_, ob); } else if (makeWholeProvisionsNode.Attributes["href"] != null) { makeWholeProvisionsIDRef_ = makeWholeProvisionsNode.Attributes["href"].Value; } else { makeWholeProvisions_ = new MakeWholeProvisions(makeWholeProvisionsNode); } } else { makeWholeProvisions_ = new MakeWholeProvisions(makeWholeProvisionsNode); } } XmlNode prePaymentNode = xmlNode.SelectSingleNode("prePayment"); if (prePaymentNode != null) { if (prePaymentNode.Attributes["href"] != null || prePaymentNode.Attributes["id"] != null) { if (prePaymentNode.Attributes["id"] != null) { prePaymentIDRef_ = prePaymentNode.Attributes["id"].Value; PrePayment ob = new PrePayment(prePaymentNode); IDManager.SetID(prePaymentIDRef_, ob); } else if (prePaymentNode.Attributes["href"] != null) { prePaymentIDRef_ = prePaymentNode.Attributes["href"].Value; } else { prePayment_ = new PrePayment(prePaymentNode); } } else { prePayment_ = new PrePayment(prePaymentNode); } } XmlNode equityValuationNode = xmlNode.SelectSingleNode("equityValuation"); if (equityValuationNode != null) { if (equityValuationNode.Attributes["href"] != null || equityValuationNode.Attributes["id"] != null) { if (equityValuationNode.Attributes["id"] != null) { equityValuationIDRef_ = equityValuationNode.Attributes["id"].Value; EquityValuation ob = new EquityValuation(equityValuationNode); IDManager.SetID(equityValuationIDRef_, ob); } else if (equityValuationNode.Attributes["href"] != null) { equityValuationIDRef_ = equityValuationNode.Attributes["href"].Value; } else { equityValuation_ = new EquityValuation(equityValuationNode); } } else { equityValuation_ = new EquityValuation(equityValuationNode); } } XmlNode settlementDateNode = xmlNode.SelectSingleNode("settlementDate"); if (settlementDateNode != null) { if (settlementDateNode.Attributes["href"] != null || settlementDateNode.Attributes["id"] != null) { if (settlementDateNode.Attributes["id"] != null) { settlementDateIDRef_ = settlementDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(settlementDateNode); IDManager.SetID(settlementDateIDRef_, ob); } else if (settlementDateNode.Attributes["href"] != null) { settlementDateIDRef_ = settlementDateNode.Attributes["href"].Value; } else { settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode); } } else { settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode); } } XmlNode settlementCurrencyNode = xmlNode.SelectSingleNode("settlementCurrency"); if (settlementCurrencyNode != null) { if (settlementCurrencyNode.Attributes["href"] != null || settlementCurrencyNode.Attributes["id"] != null) { if (settlementCurrencyNode.Attributes["id"] != null) { settlementCurrencyIDRef_ = settlementCurrencyNode.Attributes["id"].Value; Currency ob = new Currency(settlementCurrencyNode); IDManager.SetID(settlementCurrencyIDRef_, ob); } else if (settlementCurrencyNode.Attributes["href"] != null) { settlementCurrencyIDRef_ = settlementCurrencyNode.Attributes["href"].Value; } else { settlementCurrency_ = new Currency(settlementCurrencyNode); } } else { settlementCurrency_ = new Currency(settlementCurrencyNode); } } XmlNode settlementPriceSourceNode = xmlNode.SelectSingleNode("settlementPriceSource"); if (settlementPriceSourceNode != null) { if (settlementPriceSourceNode.Attributes["href"] != null || settlementPriceSourceNode.Attributes["id"] != null) { if (settlementPriceSourceNode.Attributes["id"] != null) { settlementPriceSourceIDRef_ = settlementPriceSourceNode.Attributes["id"].Value; SettlementPriceSource ob = new SettlementPriceSource(settlementPriceSourceNode); IDManager.SetID(settlementPriceSourceIDRef_, ob); } else if (settlementPriceSourceNode.Attributes["href"] != null) { settlementPriceSourceIDRef_ = settlementPriceSourceNode.Attributes["href"].Value; } else { settlementPriceSource_ = new SettlementPriceSource(settlementPriceSourceNode); } } else { settlementPriceSource_ = new SettlementPriceSource(settlementPriceSourceNode); } } XmlNode settlementTypeNode = xmlNode.SelectSingleNode("settlementType"); if (settlementTypeNode != null) { if (settlementTypeNode.Attributes["href"] != null || settlementTypeNode.Attributes["id"] != null) { if (settlementTypeNode.Attributes["id"] != null) { settlementTypeIDRef_ = settlementTypeNode.Attributes["id"].Value; SettlementTypeEnum ob = new SettlementTypeEnum(settlementTypeNode); IDManager.SetID(settlementTypeIDRef_, ob); } else if (settlementTypeNode.Attributes["href"] != null) { settlementTypeIDRef_ = settlementTypeNode.Attributes["href"].Value; } else { settlementType_ = new SettlementTypeEnum(settlementTypeNode); } } else { settlementType_ = new SettlementTypeEnum(settlementTypeNode); } } XmlNode settlementMethodElectionDateNode = xmlNode.SelectSingleNode("settlementMethodElectionDate"); if (settlementMethodElectionDateNode != null) { if (settlementMethodElectionDateNode.Attributes["href"] != null || settlementMethodElectionDateNode.Attributes["id"] != null) { if (settlementMethodElectionDateNode.Attributes["id"] != null) { settlementMethodElectionDateIDRef_ = settlementMethodElectionDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(settlementMethodElectionDateNode); IDManager.SetID(settlementMethodElectionDateIDRef_, ob); } else if (settlementMethodElectionDateNode.Attributes["href"] != null) { settlementMethodElectionDateIDRef_ = settlementMethodElectionDateNode.Attributes["href"].Value; } else { settlementMethodElectionDate_ = new AdjustableOrRelativeDate(settlementMethodElectionDateNode); } } else { settlementMethodElectionDate_ = new AdjustableOrRelativeDate(settlementMethodElectionDateNode); } } XmlNode settlementMethodElectingPartyReferenceNode = xmlNode.SelectSingleNode("settlementMethodElectingPartyReference"); if (settlementMethodElectingPartyReferenceNode != null) { if (settlementMethodElectingPartyReferenceNode.Attributes["href"] != null || settlementMethodElectingPartyReferenceNode.Attributes["id"] != null) { if (settlementMethodElectingPartyReferenceNode.Attributes["id"] != null) { settlementMethodElectingPartyReferenceIDRef_ = settlementMethodElectingPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(settlementMethodElectingPartyReferenceNode); IDManager.SetID(settlementMethodElectingPartyReferenceIDRef_, ob); } else if (settlementMethodElectingPartyReferenceNode.Attributes["href"] != null) { settlementMethodElectingPartyReferenceIDRef_ = settlementMethodElectingPartyReferenceNode.Attributes["href"].Value; } else { settlementMethodElectingPartyReference_ = new PartyReference(settlementMethodElectingPartyReferenceNode); } } else { settlementMethodElectingPartyReference_ = new PartyReference(settlementMethodElectingPartyReferenceNode); } } XmlNode settlementPriceDefaultElectionNode = xmlNode.SelectSingleNode("settlementPriceDefaultElection"); if (settlementPriceDefaultElectionNode != null) { if (settlementPriceDefaultElectionNode.Attributes["href"] != null || settlementPriceDefaultElectionNode.Attributes["id"] != null) { if (settlementPriceDefaultElectionNode.Attributes["id"] != null) { settlementPriceDefaultElectionIDRef_ = settlementPriceDefaultElectionNode.Attributes["id"].Value; SettlementPriceDefaultElection ob = new SettlementPriceDefaultElection(settlementPriceDefaultElectionNode); IDManager.SetID(settlementPriceDefaultElectionIDRef_, ob); } else if (settlementPriceDefaultElectionNode.Attributes["href"] != null) { settlementPriceDefaultElectionIDRef_ = settlementPriceDefaultElectionNode.Attributes["href"].Value; } else { settlementPriceDefaultElection_ = new SettlementPriceDefaultElection(settlementPriceDefaultElectionNode); } } else { settlementPriceDefaultElection_ = new SettlementPriceDefaultElection(settlementPriceDefaultElectionNode); } } }
public OptionBaseExtended(XmlNode xmlNode) : base(xmlNode) { XmlNode premiumNode = xmlNode.SelectSingleNode("premium"); if (premiumNode != null) { if (premiumNode.Attributes["href"] != null || premiumNode.Attributes["id"] != null) { if (premiumNode.Attributes["id"] != null) { premiumIDRef_ = premiumNode.Attributes["id"].Value; Premium ob = new Premium(premiumNode); IDManager.SetID(premiumIDRef_, ob); } else if (premiumNode.Attributes["href"] != null) { premiumIDRef_ = premiumNode.Attributes["href"].Value; } else { premium_ = new Premium(premiumNode); } } else { premium_ = new Premium(premiumNode); } } XmlNode exerciseNode = xmlNode.SelectSingleNode("exercise"); if (exerciseNode != null) { if (exerciseNode.Attributes["href"] != null || exerciseNode.Attributes["id"] != null) { if (exerciseNode.Attributes["id"] != null) { exerciseIDRef_ = exerciseNode.Attributes["id"].Value; Exercise ob = new Exercise(exerciseNode); IDManager.SetID(exerciseIDRef_, ob); } else if (exerciseNode.Attributes["href"] != null) { exerciseIDRef_ = exerciseNode.Attributes["href"].Value; } else { exercise_ = new Exercise(exerciseNode); } } else { exercise_ = new Exercise(exerciseNode); } } XmlNode americanExerciseNode = xmlNode.SelectSingleNode("americanExercise"); if (americanExerciseNode != null) { if (americanExerciseNode.Attributes["href"] != null || americanExerciseNode.Attributes["id"] != null) { if (americanExerciseNode.Attributes["id"] != null) { americanExerciseIDRef_ = americanExerciseNode.Attributes["id"].Value; AmericanExercise ob = new AmericanExercise(americanExerciseNode); IDManager.SetID(americanExerciseIDRef_, ob); } else if (americanExerciseNode.Attributes["href"] != null) { americanExerciseIDRef_ = americanExerciseNode.Attributes["href"].Value; } else { americanExercise_ = new AmericanExercise(americanExerciseNode); } } else { americanExercise_ = new AmericanExercise(americanExerciseNode); } } XmlNode bermudaExerciseNode = xmlNode.SelectSingleNode("bermudaExercise"); if (bermudaExerciseNode != null) { if (bermudaExerciseNode.Attributes["href"] != null || bermudaExerciseNode.Attributes["id"] != null) { if (bermudaExerciseNode.Attributes["id"] != null) { bermudaExerciseIDRef_ = bermudaExerciseNode.Attributes["id"].Value; BermudaExercise ob = new BermudaExercise(bermudaExerciseNode); IDManager.SetID(bermudaExerciseIDRef_, ob); } else if (bermudaExerciseNode.Attributes["href"] != null) { bermudaExerciseIDRef_ = bermudaExerciseNode.Attributes["href"].Value; } else { bermudaExercise_ = new BermudaExercise(bermudaExerciseNode); } } else { bermudaExercise_ = new BermudaExercise(bermudaExerciseNode); } } XmlNode europeanExerciseNode = xmlNode.SelectSingleNode("europeanExercise"); if (europeanExerciseNode != null) { if (europeanExerciseNode.Attributes["href"] != null || europeanExerciseNode.Attributes["id"] != null) { if (europeanExerciseNode.Attributes["id"] != null) { europeanExerciseIDRef_ = europeanExerciseNode.Attributes["id"].Value; EuropeanExercise ob = new EuropeanExercise(europeanExerciseNode); IDManager.SetID(europeanExerciseIDRef_, ob); } else if (europeanExerciseNode.Attributes["href"] != null) { europeanExerciseIDRef_ = europeanExerciseNode.Attributes["href"].Value; } else { europeanExercise_ = new EuropeanExercise(europeanExerciseNode); } } else { europeanExercise_ = new EuropeanExercise(europeanExerciseNode); } } XmlNode exerciseProcedureNode = xmlNode.SelectSingleNode("exerciseProcedure"); if (exerciseProcedureNode != null) { if (exerciseProcedureNode.Attributes["href"] != null || exerciseProcedureNode.Attributes["id"] != null) { if (exerciseProcedureNode.Attributes["id"] != null) { exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["id"].Value; ExerciseProcedure ob = new ExerciseProcedure(exerciseProcedureNode); IDManager.SetID(exerciseProcedureIDRef_, ob); } else if (exerciseProcedureNode.Attributes["href"] != null) { exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["href"].Value; } else { exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode); } } else { exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode); } } XmlNode featureNode = xmlNode.SelectSingleNode("feature"); if (featureNode != null) { if (featureNode.Attributes["href"] != null || featureNode.Attributes["id"] != null) { if (featureNode.Attributes["id"] != null) { featureIDRef_ = featureNode.Attributes["id"].Value; OptionFeature ob = new OptionFeature(featureNode); IDManager.SetID(featureIDRef_, ob); } else if (featureNode.Attributes["href"] != null) { featureIDRef_ = featureNode.Attributes["href"].Value; } else { feature_ = new OptionFeature(featureNode); } } else { feature_ = new OptionFeature(featureNode); } } XmlNode notionalReferenceNode = xmlNode.SelectSingleNode("notionalReference"); if (notionalReferenceNode != null) { if (notionalReferenceNode.Attributes["href"] != null || notionalReferenceNode.Attributes["id"] != null) { if (notionalReferenceNode.Attributes["id"] != null) { notionalReferenceIDRef_ = notionalReferenceNode.Attributes["id"].Value; NotionalAmountReference ob = new NotionalAmountReference(notionalReferenceNode); IDManager.SetID(notionalReferenceIDRef_, ob); } else if (notionalReferenceNode.Attributes["href"] != null) { notionalReferenceIDRef_ = notionalReferenceNode.Attributes["href"].Value; } else { notionalReference_ = new NotionalAmountReference(notionalReferenceNode); } } else { notionalReference_ = new NotionalAmountReference(notionalReferenceNode); } } 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; Money ob = new Money(notionalAmountNode); IDManager.SetID(notionalAmountIDRef_, ob); } else if (notionalAmountNode.Attributes["href"] != null) { notionalAmountIDRef_ = notionalAmountNode.Attributes["href"].Value; } else { notionalAmount_ = new Money(notionalAmountNode); } } else { notionalAmount_ = new Money(notionalAmountNode); } } XmlNode optionEntitlementNode = xmlNode.SelectSingleNode("optionEntitlement"); if (optionEntitlementNode != null) { if (optionEntitlementNode.Attributes["href"] != null || optionEntitlementNode.Attributes["id"] != null) { if (optionEntitlementNode.Attributes["id"] != null) { optionEntitlementIDRef_ = optionEntitlementNode.Attributes["id"].Value; PositiveDecimal ob = new PositiveDecimal(optionEntitlementNode); IDManager.SetID(optionEntitlementIDRef_, ob); } else if (optionEntitlementNode.Attributes["href"] != null) { optionEntitlementIDRef_ = optionEntitlementNode.Attributes["href"].Value; } else { optionEntitlement_ = new PositiveDecimal(optionEntitlementNode); } } else { optionEntitlement_ = new PositiveDecimal(optionEntitlementNode); } } XmlNode entitlementCurrencyNode = xmlNode.SelectSingleNode("entitlementCurrency"); if (entitlementCurrencyNode != null) { if (entitlementCurrencyNode.Attributes["href"] != null || entitlementCurrencyNode.Attributes["id"] != null) { if (entitlementCurrencyNode.Attributes["id"] != null) { entitlementCurrencyIDRef_ = entitlementCurrencyNode.Attributes["id"].Value; Currency ob = new Currency(entitlementCurrencyNode); IDManager.SetID(entitlementCurrencyIDRef_, ob); } else if (entitlementCurrencyNode.Attributes["href"] != null) { entitlementCurrencyIDRef_ = entitlementCurrencyNode.Attributes["href"].Value; } else { entitlementCurrency_ = new Currency(entitlementCurrencyNode); } } else { entitlementCurrency_ = new Currency(entitlementCurrencyNode); } } XmlNode numberOfOptionsNode = xmlNode.SelectSingleNode("numberOfOptions"); if (numberOfOptionsNode != null) { if (numberOfOptionsNode.Attributes["href"] != null || numberOfOptionsNode.Attributes["id"] != null) { if (numberOfOptionsNode.Attributes["id"] != null) { numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["id"].Value; PositiveDecimal ob = new PositiveDecimal(numberOfOptionsNode); IDManager.SetID(numberOfOptionsIDRef_, ob); } else if (numberOfOptionsNode.Attributes["href"] != null) { numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["href"].Value; } else { numberOfOptions_ = new PositiveDecimal(numberOfOptionsNode); } } else { numberOfOptions_ = new PositiveDecimal(numberOfOptionsNode); } } XmlNode settlementTypeNode = xmlNode.SelectSingleNode("settlementType"); if (settlementTypeNode != null) { if (settlementTypeNode.Attributes["href"] != null || settlementTypeNode.Attributes["id"] != null) { if (settlementTypeNode.Attributes["id"] != null) { settlementTypeIDRef_ = settlementTypeNode.Attributes["id"].Value; SettlementTypeEnum ob = new SettlementTypeEnum(settlementTypeNode); IDManager.SetID(settlementTypeIDRef_, ob); } else if (settlementTypeNode.Attributes["href"] != null) { settlementTypeIDRef_ = settlementTypeNode.Attributes["href"].Value; } else { settlementType_ = new SettlementTypeEnum(settlementTypeNode); } } else { settlementType_ = new SettlementTypeEnum(settlementTypeNode); } } XmlNode settlementDateNode = xmlNode.SelectSingleNode("settlementDate"); if (settlementDateNode != null) { if (settlementDateNode.Attributes["href"] != null || settlementDateNode.Attributes["id"] != null) { if (settlementDateNode.Attributes["id"] != null) { settlementDateIDRef_ = settlementDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(settlementDateNode); IDManager.SetID(settlementDateIDRef_, ob); } else if (settlementDateNode.Attributes["href"] != null) { settlementDateIDRef_ = settlementDateNode.Attributes["href"].Value; } else { settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode); } } else { settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode); } } XmlNode settlementAmountNode = xmlNode.SelectSingleNode("settlementAmount"); if (settlementAmountNode != null) { if (settlementAmountNode.Attributes["href"] != null || settlementAmountNode.Attributes["id"] != null) { if (settlementAmountNode.Attributes["id"] != null) { settlementAmountIDRef_ = settlementAmountNode.Attributes["id"].Value; Money ob = new Money(settlementAmountNode); IDManager.SetID(settlementAmountIDRef_, ob); } else if (settlementAmountNode.Attributes["href"] != null) { settlementAmountIDRef_ = settlementAmountNode.Attributes["href"].Value; } else { settlementAmount_ = new Money(settlementAmountNode); } } else { settlementAmount_ = new Money(settlementAmountNode); } } XmlNode settlementCurrencyNode = xmlNode.SelectSingleNode("settlementCurrency"); if (settlementCurrencyNode != null) { if (settlementCurrencyNode.Attributes["href"] != null || settlementCurrencyNode.Attributes["id"] != null) { if (settlementCurrencyNode.Attributes["id"] != null) { settlementCurrencyIDRef_ = settlementCurrencyNode.Attributes["id"].Value; Currency ob = new Currency(settlementCurrencyNode); IDManager.SetID(settlementCurrencyIDRef_, ob); } else if (settlementCurrencyNode.Attributes["href"] != null) { settlementCurrencyIDRef_ = settlementCurrencyNode.Attributes["href"].Value; } else { settlementCurrency_ = new Currency(settlementCurrencyNode); } } else { settlementCurrency_ = new Currency(settlementCurrencyNode); } } }
public CommodityOption(XmlNode xmlNode) : base(xmlNode) { XmlNode buyerPartyReferenceNode = xmlNode.SelectSingleNode("buyerPartyReference"); if (buyerPartyReferenceNode != null) { if (buyerPartyReferenceNode.Attributes["href"] != null || buyerPartyReferenceNode.Attributes["id"] != null) { if (buyerPartyReferenceNode.Attributes["id"] != null) { buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(buyerPartyReferenceNode); IDManager.SetID(buyerPartyReferenceIDRef_, ob); } else if (buyerPartyReferenceNode.Attributes["href"] != null) { buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["href"].Value; } else { buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode); } } else { buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode); } } XmlNode buyerAccountReferenceNode = xmlNode.SelectSingleNode("buyerAccountReference"); if (buyerAccountReferenceNode != null) { if (buyerAccountReferenceNode.Attributes["href"] != null || buyerAccountReferenceNode.Attributes["id"] != null) { if (buyerAccountReferenceNode.Attributes["id"] != null) { buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["id"].Value; AccountReference ob = new AccountReference(buyerAccountReferenceNode); IDManager.SetID(buyerAccountReferenceIDRef_, ob); } else if (buyerAccountReferenceNode.Attributes["href"] != null) { buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["href"].Value; } else { buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode); } } else { buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode); } } XmlNode sellerPartyReferenceNode = xmlNode.SelectSingleNode("sellerPartyReference"); if (sellerPartyReferenceNode != null) { if (sellerPartyReferenceNode.Attributes["href"] != null || sellerPartyReferenceNode.Attributes["id"] != null) { if (sellerPartyReferenceNode.Attributes["id"] != null) { sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(sellerPartyReferenceNode); IDManager.SetID(sellerPartyReferenceIDRef_, ob); } else if (sellerPartyReferenceNode.Attributes["href"] != null) { sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["href"].Value; } else { sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode); } } else { sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode); } } XmlNode sellerAccountReferenceNode = xmlNode.SelectSingleNode("sellerAccountReference"); if (sellerAccountReferenceNode != null) { if (sellerAccountReferenceNode.Attributes["href"] != null || sellerAccountReferenceNode.Attributes["id"] != null) { if (sellerAccountReferenceNode.Attributes["id"] != null) { sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["id"].Value; AccountReference ob = new AccountReference(sellerAccountReferenceNode); IDManager.SetID(sellerAccountReferenceIDRef_, ob); } else if (sellerAccountReferenceNode.Attributes["href"] != null) { sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["href"].Value; } else { sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode); } } else { sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode); } } XmlNode optionTypeNode = xmlNode.SelectSingleNode("optionType"); if (optionTypeNode != null) { if (optionTypeNode.Attributes["href"] != null || optionTypeNode.Attributes["id"] != null) { if (optionTypeNode.Attributes["id"] != null) { optionTypeIDRef_ = optionTypeNode.Attributes["id"].Value; PutCallEnum ob = new PutCallEnum(optionTypeNode); IDManager.SetID(optionTypeIDRef_, ob); } else if (optionTypeNode.Attributes["href"] != null) { optionTypeIDRef_ = optionTypeNode.Attributes["href"].Value; } else { optionType_ = new PutCallEnum(optionTypeNode); } } else { optionType_ = new PutCallEnum(optionTypeNode); } } XmlNode commodityNode = xmlNode.SelectSingleNode("commodity"); if (commodityNode != null) { if (commodityNode.Attributes["href"] != null || commodityNode.Attributes["id"] != null) { if (commodityNode.Attributes["id"] != null) { commodityIDRef_ = commodityNode.Attributes["id"].Value; Commodity ob = new Commodity(commodityNode); IDManager.SetID(commodityIDRef_, ob); } else if (commodityNode.Attributes["href"] != null) { commodityIDRef_ = commodityNode.Attributes["href"].Value; } else { commodity_ = new Commodity(commodityNode); } } else { commodity_ = new Commodity(commodityNode); } } XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate"); if (effectiveDateNode != null) { if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) { if (effectiveDateNode.Attributes["id"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(effectiveDateNode); IDManager.SetID(effectiveDateIDRef_, ob); } else if (effectiveDateNode.Attributes["href"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value; } else { effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode); } } else { effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode); } } XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate"); if (terminationDateNode != null) { if (terminationDateNode.Attributes["href"] != null || terminationDateNode.Attributes["id"] != null) { if (terminationDateNode.Attributes["id"] != null) { terminationDateIDRef_ = terminationDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(terminationDateNode); IDManager.SetID(terminationDateIDRef_, ob); } else if (terminationDateNode.Attributes["href"] != null) { terminationDateIDRef_ = terminationDateNode.Attributes["href"].Value; } else { terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode); } } else { terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode); } } XmlNode calculationPeriodsScheduleNode = xmlNode.SelectSingleNode("calculationPeriodsSchedule"); if (calculationPeriodsScheduleNode != null) { if (calculationPeriodsScheduleNode.Attributes["href"] != null || calculationPeriodsScheduleNode.Attributes["id"] != null) { if (calculationPeriodsScheduleNode.Attributes["id"] != null) { calculationPeriodsScheduleIDRef_ = calculationPeriodsScheduleNode.Attributes["id"].Value; CommodityCalculationPeriodsSchedule ob = new CommodityCalculationPeriodsSchedule(calculationPeriodsScheduleNode); IDManager.SetID(calculationPeriodsScheduleIDRef_, ob); } else if (calculationPeriodsScheduleNode.Attributes["href"] != null) { calculationPeriodsScheduleIDRef_ = calculationPeriodsScheduleNode.Attributes["href"].Value; } else { calculationPeriodsSchedule_ = new CommodityCalculationPeriodsSchedule(calculationPeriodsScheduleNode); } } else { calculationPeriodsSchedule_ = new CommodityCalculationPeriodsSchedule(calculationPeriodsScheduleNode); } } XmlNode calculationPeriodsNode = xmlNode.SelectSingleNode("calculationPeriods"); if (calculationPeriodsNode != null) { if (calculationPeriodsNode.Attributes["href"] != null || calculationPeriodsNode.Attributes["id"] != null) { if (calculationPeriodsNode.Attributes["id"] != null) { calculationPeriodsIDRef_ = calculationPeriodsNode.Attributes["id"].Value; AdjustableDates ob = new AdjustableDates(calculationPeriodsNode); IDManager.SetID(calculationPeriodsIDRef_, ob); } else if (calculationPeriodsNode.Attributes["href"] != null) { calculationPeriodsIDRef_ = calculationPeriodsNode.Attributes["href"].Value; } else { calculationPeriods_ = new AdjustableDates(calculationPeriodsNode); } } else { calculationPeriods_ = new AdjustableDates(calculationPeriodsNode); } } XmlNode pricingDatesNode = xmlNode.SelectSingleNode("pricingDates"); if (pricingDatesNode != null) { if (pricingDatesNode.Attributes["href"] != null || pricingDatesNode.Attributes["id"] != null) { if (pricingDatesNode.Attributes["id"] != null) { pricingDatesIDRef_ = pricingDatesNode.Attributes["id"].Value; CommodityPricingDates ob = new CommodityPricingDates(pricingDatesNode); IDManager.SetID(pricingDatesIDRef_, ob); } else if (pricingDatesNode.Attributes["href"] != null) { pricingDatesIDRef_ = pricingDatesNode.Attributes["href"].Value; } else { pricingDates_ = new CommodityPricingDates(pricingDatesNode); } } else { pricingDates_ = new CommodityPricingDates(pricingDatesNode); } } XmlNode averagingMethodNode = xmlNode.SelectSingleNode("averagingMethod"); if (averagingMethodNode != null) { if (averagingMethodNode.Attributes["href"] != null || averagingMethodNode.Attributes["id"] != null) { if (averagingMethodNode.Attributes["id"] != null) { averagingMethodIDRef_ = averagingMethodNode.Attributes["id"].Value; AveragingMethodEnum ob = new AveragingMethodEnum(averagingMethodNode); IDManager.SetID(averagingMethodIDRef_, ob); } else if (averagingMethodNode.Attributes["href"] != null) { averagingMethodIDRef_ = averagingMethodNode.Attributes["href"].Value; } else { averagingMethod_ = new AveragingMethodEnum(averagingMethodNode); } } else { averagingMethod_ = new AveragingMethodEnum(averagingMethodNode); } } XmlNode notionalQuantityScheduleNode = xmlNode.SelectSingleNode("notionalQuantitySchedule"); if (notionalQuantityScheduleNode != null) { if (notionalQuantityScheduleNode.Attributes["href"] != null || notionalQuantityScheduleNode.Attributes["id"] != null) { if (notionalQuantityScheduleNode.Attributes["id"] != null) { notionalQuantityScheduleIDRef_ = notionalQuantityScheduleNode.Attributes["id"].Value; CommodityNotionalQuantitySchedule ob = new CommodityNotionalQuantitySchedule(notionalQuantityScheduleNode); IDManager.SetID(notionalQuantityScheduleIDRef_, ob); } else if (notionalQuantityScheduleNode.Attributes["href"] != null) { notionalQuantityScheduleIDRef_ = notionalQuantityScheduleNode.Attributes["href"].Value; } else { notionalQuantitySchedule_ = new CommodityNotionalQuantitySchedule(notionalQuantityScheduleNode); } } else { notionalQuantitySchedule_ = new CommodityNotionalQuantitySchedule(notionalQuantityScheduleNode); } } XmlNode notionalQuantityNode = xmlNode.SelectSingleNode("notionalQuantity"); if (notionalQuantityNode != null) { if (notionalQuantityNode.Attributes["href"] != null || notionalQuantityNode.Attributes["id"] != null) { if (notionalQuantityNode.Attributes["id"] != null) { notionalQuantityIDRef_ = notionalQuantityNode.Attributes["id"].Value; CommodityNotionalQuantity ob = new CommodityNotionalQuantity(notionalQuantityNode); IDManager.SetID(notionalQuantityIDRef_, ob); } else if (notionalQuantityNode.Attributes["href"] != null) { notionalQuantityIDRef_ = notionalQuantityNode.Attributes["href"].Value; } else { notionalQuantity_ = new CommodityNotionalQuantity(notionalQuantityNode); } } else { notionalQuantity_ = new CommodityNotionalQuantity(notionalQuantityNode); } } XmlNodeList settlementPeriodsNotionalQuantityNodeList = xmlNode.SelectNodes("settlementPeriodsNotionalQuantity"); if (settlementPeriodsNotionalQuantityNodeList != null) { this.settlementPeriodsNotionalQuantity_ = new List<CommoditySettlementPeriodsNotionalQuantity>(); foreach (XmlNode item in settlementPeriodsNotionalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { settlementPeriodsNotionalQuantityIDRef_ = item.Attributes["id"].Value; settlementPeriodsNotionalQuantity_.Add(new CommoditySettlementPeriodsNotionalQuantity(item)); IDManager.SetID(settlementPeriodsNotionalQuantityIDRef_, settlementPeriodsNotionalQuantity_[settlementPeriodsNotionalQuantity_.Count - 1 ]); } else if (item.Attributes["href"] != null) { settlementPeriodsNotionalQuantityIDRef_ = item.Attributes["href"].Value; } else { settlementPeriodsNotionalQuantity_.Add(new CommoditySettlementPeriodsNotionalQuantity(item)); } } else { settlementPeriodsNotionalQuantity_.Add(new CommoditySettlementPeriodsNotionalQuantity(item)); } } } XmlNode totalNotionalQuantityNode = xmlNode.SelectSingleNode("totalNotionalQuantity"); if (totalNotionalQuantityNode != null) { if (totalNotionalQuantityNode.Attributes["href"] != null || totalNotionalQuantityNode.Attributes["id"] != null) { if (totalNotionalQuantityNode.Attributes["id"] != null) { totalNotionalQuantityIDRef_ = totalNotionalQuantityNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(totalNotionalQuantityNode); IDManager.SetID(totalNotionalQuantityIDRef_, ob); } else if (totalNotionalQuantityNode.Attributes["href"] != null) { totalNotionalQuantityIDRef_ = totalNotionalQuantityNode.Attributes["href"].Value; } else { totalNotionalQuantity_ = new XsdTypeDecimal(totalNotionalQuantityNode); } } else { totalNotionalQuantity_ = new XsdTypeDecimal(totalNotionalQuantityNode); } } XmlNode quantityReferenceNode = xmlNode.SelectSingleNode("quantityReference"); if (quantityReferenceNode != null) { if (quantityReferenceNode.Attributes["href"] != null || quantityReferenceNode.Attributes["id"] != null) { if (quantityReferenceNode.Attributes["id"] != null) { quantityReferenceIDRef_ = quantityReferenceNode.Attributes["id"].Value; QuantityReference ob = new QuantityReference(quantityReferenceNode); IDManager.SetID(quantityReferenceIDRef_, ob); } else if (quantityReferenceNode.Attributes["href"] != null) { quantityReferenceIDRef_ = quantityReferenceNode.Attributes["href"].Value; } else { quantityReference_ = new QuantityReference(quantityReferenceNode); } } else { quantityReference_ = new QuantityReference(quantityReferenceNode); } } XmlNode exerciseNode = xmlNode.SelectSingleNode("exercise"); if (exerciseNode != null) { if (exerciseNode.Attributes["href"] != null || exerciseNode.Attributes["id"] != null) { if (exerciseNode.Attributes["id"] != null) { exerciseIDRef_ = exerciseNode.Attributes["id"].Value; CommodityExercise ob = new CommodityExercise(exerciseNode); IDManager.SetID(exerciseIDRef_, ob); } else if (exerciseNode.Attributes["href"] != null) { exerciseIDRef_ = exerciseNode.Attributes["href"].Value; } else { exercise_ = new CommodityExercise(exerciseNode); } } else { exercise_ = new CommodityExercise(exerciseNode); } } XmlNode strikePricePerUnitNode = xmlNode.SelectSingleNode("strikePricePerUnit"); if (strikePricePerUnitNode != null) { if (strikePricePerUnitNode.Attributes["href"] != null || strikePricePerUnitNode.Attributes["id"] != null) { if (strikePricePerUnitNode.Attributes["id"] != null) { strikePricePerUnitIDRef_ = strikePricePerUnitNode.Attributes["id"].Value; NonNegativeMoney ob = new NonNegativeMoney(strikePricePerUnitNode); IDManager.SetID(strikePricePerUnitIDRef_, ob); } else if (strikePricePerUnitNode.Attributes["href"] != null) { strikePricePerUnitIDRef_ = strikePricePerUnitNode.Attributes["href"].Value; } else { strikePricePerUnit_ = new NonNegativeMoney(strikePricePerUnitNode); } } else { strikePricePerUnit_ = new NonNegativeMoney(strikePricePerUnitNode); } } XmlNode strikePricePerUnitScheduleNode = xmlNode.SelectSingleNode("strikePricePerUnitSchedule"); if (strikePricePerUnitScheduleNode != null) { if (strikePricePerUnitScheduleNode.Attributes["href"] != null || strikePricePerUnitScheduleNode.Attributes["id"] != null) { if (strikePricePerUnitScheduleNode.Attributes["id"] != null) { strikePricePerUnitScheduleIDRef_ = strikePricePerUnitScheduleNode.Attributes["id"].Value; CommodityStrikeSchedule ob = new CommodityStrikeSchedule(strikePricePerUnitScheduleNode); IDManager.SetID(strikePricePerUnitScheduleIDRef_, ob); } else if (strikePricePerUnitScheduleNode.Attributes["href"] != null) { strikePricePerUnitScheduleIDRef_ = strikePricePerUnitScheduleNode.Attributes["href"].Value; } else { strikePricePerUnitSchedule_ = new CommodityStrikeSchedule(strikePricePerUnitScheduleNode); } } else { strikePricePerUnitSchedule_ = new CommodityStrikeSchedule(strikePricePerUnitScheduleNode); } } XmlNode floatingStrikePricePerUnitNode = xmlNode.SelectSingleNode("floatingStrikePricePerUnit"); if (floatingStrikePricePerUnitNode != null) { if (floatingStrikePricePerUnitNode.Attributes["href"] != null || floatingStrikePricePerUnitNode.Attributes["id"] != null) { if (floatingStrikePricePerUnitNode.Attributes["id"] != null) { floatingStrikePricePerUnitIDRef_ = floatingStrikePricePerUnitNode.Attributes["id"].Value; FloatingStrikePrice ob = new FloatingStrikePrice(floatingStrikePricePerUnitNode); IDManager.SetID(floatingStrikePricePerUnitIDRef_, ob); } else if (floatingStrikePricePerUnitNode.Attributes["href"] != null) { floatingStrikePricePerUnitIDRef_ = floatingStrikePricePerUnitNode.Attributes["href"].Value; } else { floatingStrikePricePerUnit_ = new FloatingStrikePrice(floatingStrikePricePerUnitNode); } } else { floatingStrikePricePerUnit_ = new FloatingStrikePrice(floatingStrikePricePerUnitNode); } } XmlNode floatingStrikePricePerUnitScheduleNode = xmlNode.SelectSingleNode("floatingStrikePricePerUnitSchedule"); if (floatingStrikePricePerUnitScheduleNode != null) { if (floatingStrikePricePerUnitScheduleNode.Attributes["href"] != null || floatingStrikePricePerUnitScheduleNode.Attributes["id"] != null) { if (floatingStrikePricePerUnitScheduleNode.Attributes["id"] != null) { floatingStrikePricePerUnitScheduleIDRef_ = floatingStrikePricePerUnitScheduleNode.Attributes["id"].Value; CommodityCalculationPeriodsSchedule ob = new CommodityCalculationPeriodsSchedule(floatingStrikePricePerUnitScheduleNode); IDManager.SetID(floatingStrikePricePerUnitScheduleIDRef_, ob); } else if (floatingStrikePricePerUnitScheduleNode.Attributes["href"] != null) { floatingStrikePricePerUnitScheduleIDRef_ = floatingStrikePricePerUnitScheduleNode.Attributes["href"].Value; } else { floatingStrikePricePerUnitSchedule_ = new CommodityCalculationPeriodsSchedule(floatingStrikePricePerUnitScheduleNode); } } else { floatingStrikePricePerUnitSchedule_ = new CommodityCalculationPeriodsSchedule(floatingStrikePricePerUnitScheduleNode); } } XmlNode commoditySwapNode = xmlNode.SelectSingleNode("commoditySwap"); if (commoditySwapNode != null) { if (commoditySwapNode.Attributes["href"] != null || commoditySwapNode.Attributes["id"] != null) { if (commoditySwapNode.Attributes["id"] != null) { commoditySwapIDRef_ = commoditySwapNode.Attributes["id"].Value; CommoditySwap ob = new CommoditySwap(commoditySwapNode); IDManager.SetID(commoditySwapIDRef_, ob); } else if (commoditySwapNode.Attributes["href"] != null) { commoditySwapIDRef_ = commoditySwapNode.Attributes["href"].Value; } else { commoditySwap_ = new CommoditySwap(commoditySwapNode); } } else { commoditySwap_ = new CommoditySwap(commoditySwapNode); } } XmlNode commodityForwardNode = xmlNode.SelectSingleNode("commodityForward"); if (commodityForwardNode != null) { if (commodityForwardNode.Attributes["href"] != null || commodityForwardNode.Attributes["id"] != null) { if (commodityForwardNode.Attributes["id"] != null) { commodityForwardIDRef_ = commodityForwardNode.Attributes["id"].Value; CommodityForward ob = new CommodityForward(commodityForwardNode); IDManager.SetID(commodityForwardIDRef_, ob); } else if (commodityForwardNode.Attributes["href"] != null) { commodityForwardIDRef_ = commodityForwardNode.Attributes["href"].Value; } else { commodityForward_ = new CommodityForward(commodityForwardNode); } } else { commodityForward_ = new CommodityForward(commodityForwardNode); } } XmlNode physicalExerciseNode = xmlNode.SelectSingleNode("physicalExercise"); if (physicalExerciseNode != null) { if (physicalExerciseNode.Attributes["href"] != null || physicalExerciseNode.Attributes["id"] != null) { if (physicalExerciseNode.Attributes["id"] != null) { physicalExerciseIDRef_ = physicalExerciseNode.Attributes["id"].Value; CommodityPhysicalExercise ob = new CommodityPhysicalExercise(physicalExerciseNode); IDManager.SetID(physicalExerciseIDRef_, ob); } else if (physicalExerciseNode.Attributes["href"] != null) { physicalExerciseIDRef_ = physicalExerciseNode.Attributes["href"].Value; } else { physicalExercise_ = new CommodityPhysicalExercise(physicalExerciseNode); } } else { physicalExercise_ = new CommodityPhysicalExercise(physicalExerciseNode); } } XmlNode weatherCalculationPeriodsNode = xmlNode.SelectSingleNode("weatherCalculationPeriods"); if (weatherCalculationPeriodsNode != null) { if (weatherCalculationPeriodsNode.Attributes["href"] != null || weatherCalculationPeriodsNode.Attributes["id"] != null) { if (weatherCalculationPeriodsNode.Attributes["id"] != null) { weatherCalculationPeriodsIDRef_ = weatherCalculationPeriodsNode.Attributes["id"].Value; WeatherCalculationPeriods ob = new WeatherCalculationPeriods(weatherCalculationPeriodsNode); IDManager.SetID(weatherCalculationPeriodsIDRef_, ob); } else if (weatherCalculationPeriodsNode.Attributes["href"] != null) { weatherCalculationPeriodsIDRef_ = weatherCalculationPeriodsNode.Attributes["href"].Value; } else { weatherCalculationPeriods_ = new WeatherCalculationPeriods(weatherCalculationPeriodsNode); } } else { weatherCalculationPeriods_ = new WeatherCalculationPeriods(weatherCalculationPeriodsNode); } } XmlNode weatherCalculationPeriodsReferenceNode = xmlNode.SelectSingleNode("weatherCalculationPeriodsReference"); if (weatherCalculationPeriodsReferenceNode != null) { if (weatherCalculationPeriodsReferenceNode.Attributes["href"] != null || weatherCalculationPeriodsReferenceNode.Attributes["id"] != null) { if (weatherCalculationPeriodsReferenceNode.Attributes["id"] != null) { weatherCalculationPeriodsReferenceIDRef_ = weatherCalculationPeriodsReferenceNode.Attributes["id"].Value; CalculationPeriodsReference ob = new CalculationPeriodsReference(weatherCalculationPeriodsReferenceNode); IDManager.SetID(weatherCalculationPeriodsReferenceIDRef_, ob); } else if (weatherCalculationPeriodsReferenceNode.Attributes["href"] != null) { weatherCalculationPeriodsReferenceIDRef_ = weatherCalculationPeriodsReferenceNode.Attributes["href"].Value; } else { weatherCalculationPeriodsReference_ = new CalculationPeriodsReference(weatherCalculationPeriodsReferenceNode); } } else { weatherCalculationPeriodsReference_ = new CalculationPeriodsReference(weatherCalculationPeriodsReferenceNode); } } XmlNode weatherNotionalAmountNode = xmlNode.SelectSingleNode("weatherNotionalAmount"); if (weatherNotionalAmountNode != null) { if (weatherNotionalAmountNode.Attributes["href"] != null || weatherNotionalAmountNode.Attributes["id"] != null) { if (weatherNotionalAmountNode.Attributes["id"] != null) { weatherNotionalAmountIDRef_ = weatherNotionalAmountNode.Attributes["id"].Value; NonNegativeMoney ob = new NonNegativeMoney(weatherNotionalAmountNode); IDManager.SetID(weatherNotionalAmountIDRef_, ob); } else if (weatherNotionalAmountNode.Attributes["href"] != null) { weatherNotionalAmountIDRef_ = weatherNotionalAmountNode.Attributes["href"].Value; } else { weatherNotionalAmount_ = new NonNegativeMoney(weatherNotionalAmountNode); } } else { weatherNotionalAmount_ = new NonNegativeMoney(weatherNotionalAmountNode); } } XmlNode weatherIndexStrikeLevelNode = xmlNode.SelectSingleNode("weatherIndexStrikeLevel"); if (weatherIndexStrikeLevelNode != null) { if (weatherIndexStrikeLevelNode.Attributes["href"] != null || weatherIndexStrikeLevelNode.Attributes["id"] != null) { if (weatherIndexStrikeLevelNode.Attributes["id"] != null) { weatherIndexStrikeLevelIDRef_ = weatherIndexStrikeLevelNode.Attributes["id"].Value; WeatherIndex ob = new WeatherIndex(weatherIndexStrikeLevelNode); IDManager.SetID(weatherIndexStrikeLevelIDRef_, ob); } else if (weatherIndexStrikeLevelNode.Attributes["href"] != null) { weatherIndexStrikeLevelIDRef_ = weatherIndexStrikeLevelNode.Attributes["href"].Value; } else { weatherIndexStrikeLevel_ = new WeatherIndex(weatherIndexStrikeLevelNode); } } else { weatherIndexStrikeLevel_ = new WeatherIndex(weatherIndexStrikeLevelNode); } } XmlNode calculationNode = xmlNode.SelectSingleNode("calculation"); if (calculationNode != null) { if (calculationNode.Attributes["href"] != null || calculationNode.Attributes["id"] != null) { if (calculationNode.Attributes["id"] != null) { calculationIDRef_ = calculationNode.Attributes["id"].Value; WeatherLegCalculation ob = new WeatherLegCalculation(calculationNode); IDManager.SetID(calculationIDRef_, ob); } else if (calculationNode.Attributes["href"] != null) { calculationIDRef_ = calculationNode.Attributes["href"].Value; } else { calculation_ = new WeatherLegCalculation(calculationNode); } } else { calculation_ = new WeatherLegCalculation(calculationNode); } } XmlNode weatherIndexDataNode = xmlNode.SelectSingleNode("weatherIndexData"); if (weatherIndexDataNode != null) { if (weatherIndexDataNode.Attributes["href"] != null || weatherIndexDataNode.Attributes["id"] != null) { if (weatherIndexDataNode.Attributes["id"] != null) { weatherIndexDataIDRef_ = weatherIndexDataNode.Attributes["id"].Value; WeatherIndexData ob = new WeatherIndexData(weatherIndexDataNode); IDManager.SetID(weatherIndexDataIDRef_, ob); } else if (weatherIndexDataNode.Attributes["href"] != null) { weatherIndexDataIDRef_ = weatherIndexDataNode.Attributes["href"].Value; } else { weatherIndexData_ = new WeatherIndexData(weatherIndexDataNode); } } else { weatherIndexData_ = new WeatherIndexData(weatherIndexDataNode); } } XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium"); if (premiumNodeList != null) { this.premium_ = new List<CommodityPremium>(); foreach (XmlNode item in premiumNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { premiumIDRef_ = item.Attributes["id"].Value; premium_.Add(new CommodityPremium(item)); IDManager.SetID(premiumIDRef_, premium_[premium_.Count - 1 ]); } else if (item.Attributes["href"] != null) { premiumIDRef_ = item.Attributes["href"].Value; } else { premium_.Add(new CommodityPremium(item)); } } else { premium_.Add(new CommodityPremium(item)); } } } XmlNode commonPricingNode = xmlNode.SelectSingleNode("commonPricing"); if (commonPricingNode != null) { if (commonPricingNode.Attributes["href"] != null || commonPricingNode.Attributes["id"] != null) { if (commonPricingNode.Attributes["id"] != null) { commonPricingIDRef_ = commonPricingNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(commonPricingNode); IDManager.SetID(commonPricingIDRef_, ob); } else if (commonPricingNode.Attributes["href"] != null) { commonPricingIDRef_ = commonPricingNode.Attributes["href"].Value; } else { commonPricing_ = new XsdTypeBoolean(commonPricingNode); } } else { commonPricing_ = new XsdTypeBoolean(commonPricingNode); } } XmlNode marketDisruptionNode = xmlNode.SelectSingleNode("marketDisruption"); if (marketDisruptionNode != null) { if (marketDisruptionNode.Attributes["href"] != null || marketDisruptionNode.Attributes["id"] != null) { if (marketDisruptionNode.Attributes["id"] != null) { marketDisruptionIDRef_ = marketDisruptionNode.Attributes["id"].Value; CommodityMarketDisruption ob = new CommodityMarketDisruption(marketDisruptionNode); IDManager.SetID(marketDisruptionIDRef_, ob); } else if (marketDisruptionNode.Attributes["href"] != null) { marketDisruptionIDRef_ = marketDisruptionNode.Attributes["href"].Value; } else { marketDisruption_ = new CommodityMarketDisruption(marketDisruptionNode); } } else { marketDisruption_ = new CommodityMarketDisruption(marketDisruptionNode); } } XmlNode settlementDisruptionNode = xmlNode.SelectSingleNode("settlementDisruption"); if (settlementDisruptionNode != null) { if (settlementDisruptionNode.Attributes["href"] != null || settlementDisruptionNode.Attributes["id"] != null) { if (settlementDisruptionNode.Attributes["id"] != null) { settlementDisruptionIDRef_ = settlementDisruptionNode.Attributes["id"].Value; CommodityBullionSettlementDisruptionEnum ob = new CommodityBullionSettlementDisruptionEnum(settlementDisruptionNode); IDManager.SetID(settlementDisruptionIDRef_, ob); } else if (settlementDisruptionNode.Attributes["href"] != null) { settlementDisruptionIDRef_ = settlementDisruptionNode.Attributes["href"].Value; } else { settlementDisruption_ = new CommodityBullionSettlementDisruptionEnum(settlementDisruptionNode); } } else { settlementDisruption_ = new CommodityBullionSettlementDisruptionEnum(settlementDisruptionNode); } } XmlNode roundingNode = xmlNode.SelectSingleNode("rounding"); if (roundingNode != null) { if (roundingNode.Attributes["href"] != null || roundingNode.Attributes["id"] != null) { if (roundingNode.Attributes["id"] != null) { roundingIDRef_ = roundingNode.Attributes["id"].Value; Rounding ob = new Rounding(roundingNode); IDManager.SetID(roundingIDRef_, ob); } else if (roundingNode.Attributes["href"] != null) { roundingIDRef_ = roundingNode.Attributes["href"].Value; } else { rounding_ = new Rounding(roundingNode); } } else { rounding_ = new Rounding(roundingNode); } } }
public ReturnSwapAdditionalPayment(XmlNode xmlNode) : base(xmlNode) { XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference"); if (payerPartyReferenceNode != null) { if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) { if (payerPartyReferenceNode.Attributes["id"] != null) { payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(payerPartyReferenceNode); IDManager.SetID(payerPartyReferenceIDRef_, ob); } else if (payerPartyReferenceNode.Attributes["href"] != null) { payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value; } else { payerPartyReference_ = new PartyReference(payerPartyReferenceNode); } } else { payerPartyReference_ = new PartyReference(payerPartyReferenceNode); } } XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference"); if (payerAccountReferenceNode != null) { if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) { if (payerAccountReferenceNode.Attributes["id"] != null) { payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value; AccountReference ob = new AccountReference(payerAccountReferenceNode); IDManager.SetID(payerAccountReferenceIDRef_, ob); } else if (payerAccountReferenceNode.Attributes["href"] != null) { payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value; } else { payerAccountReference_ = new AccountReference(payerAccountReferenceNode); } } else { payerAccountReference_ = new AccountReference(payerAccountReferenceNode); } } XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference"); if (receiverPartyReferenceNode != null) { if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) { if (receiverPartyReferenceNode.Attributes["id"] != null) { receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(receiverPartyReferenceNode); IDManager.SetID(receiverPartyReferenceIDRef_, ob); } else if (receiverPartyReferenceNode.Attributes["href"] != null) { receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value; } else { receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode); } } else { receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode); } } XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference"); if (receiverAccountReferenceNode != null) { if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) { if (receiverAccountReferenceNode.Attributes["id"] != null) { receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value; AccountReference ob = new AccountReference(receiverAccountReferenceNode); IDManager.SetID(receiverAccountReferenceIDRef_, ob); } else if (receiverAccountReferenceNode.Attributes["href"] != null) { receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value; } else { receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode); } } else { receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode); } } XmlNode additionalPaymentAmountNode = xmlNode.SelectSingleNode("additionalPaymentAmount"); if (additionalPaymentAmountNode != null) { if (additionalPaymentAmountNode.Attributes["href"] != null || additionalPaymentAmountNode.Attributes["id"] != null) { if (additionalPaymentAmountNode.Attributes["id"] != null) { additionalPaymentAmountIDRef_ = additionalPaymentAmountNode.Attributes["id"].Value; AdditionalPaymentAmount ob = new AdditionalPaymentAmount(additionalPaymentAmountNode); IDManager.SetID(additionalPaymentAmountIDRef_, ob); } else if (additionalPaymentAmountNode.Attributes["href"] != null) { additionalPaymentAmountIDRef_ = additionalPaymentAmountNode.Attributes["href"].Value; } else { additionalPaymentAmount_ = new AdditionalPaymentAmount(additionalPaymentAmountNode); } } else { additionalPaymentAmount_ = new AdditionalPaymentAmount(additionalPaymentAmountNode); } } XmlNode additionalPaymentDateNode = xmlNode.SelectSingleNode("additionalPaymentDate"); if (additionalPaymentDateNode != null) { if (additionalPaymentDateNode.Attributes["href"] != null || additionalPaymentDateNode.Attributes["id"] != null) { if (additionalPaymentDateNode.Attributes["id"] != null) { additionalPaymentDateIDRef_ = additionalPaymentDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(additionalPaymentDateNode); IDManager.SetID(additionalPaymentDateIDRef_, ob); } else if (additionalPaymentDateNode.Attributes["href"] != null) { additionalPaymentDateIDRef_ = additionalPaymentDateNode.Attributes["href"].Value; } else { additionalPaymentDate_ = new AdjustableOrRelativeDate(additionalPaymentDateNode); } } else { additionalPaymentDate_ = new AdjustableOrRelativeDate(additionalPaymentDateNode); } } XmlNode paymentTypeNode = xmlNode.SelectSingleNode("paymentType"); if (paymentTypeNode != null) { if (paymentTypeNode.Attributes["href"] != null || paymentTypeNode.Attributes["id"] != null) { if (paymentTypeNode.Attributes["id"] != null) { paymentTypeIDRef_ = paymentTypeNode.Attributes["id"].Value; PaymentType ob = new PaymentType(paymentTypeNode); IDManager.SetID(paymentTypeIDRef_, ob); } else if (paymentTypeNode.Attributes["href"] != null) { paymentTypeIDRef_ = paymentTypeNode.Attributes["href"].Value; } else { paymentType_ = new PaymentType(paymentTypeNode); } } else { paymentType_ = new PaymentType(paymentTypeNode); } } }
public InterestLegCalculationPeriodDates(XmlNode xmlNode) { XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate"); if (effectiveDateNode != null) { if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) { if (effectiveDateNode.Attributes["id"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(effectiveDateNode); IDManager.SetID(effectiveDateIDRef_, ob); } else if (effectiveDateNode.Attributes["href"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value; } else { effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode); } } else { effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode); } } XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate"); if (terminationDateNode != null) { if (terminationDateNode.Attributes["href"] != null || terminationDateNode.Attributes["id"] != null) { if (terminationDateNode.Attributes["id"] != null) { terminationDateIDRef_ = terminationDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(terminationDateNode); IDManager.SetID(terminationDateIDRef_, ob); } else if (terminationDateNode.Attributes["href"] != null) { terminationDateIDRef_ = terminationDateNode.Attributes["href"].Value; } else { terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode); } } else { terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode); } } XmlNode interestLegResetDatesNode = xmlNode.SelectSingleNode("interestLegResetDates"); if (interestLegResetDatesNode != null) { if (interestLegResetDatesNode.Attributes["href"] != null || interestLegResetDatesNode.Attributes["id"] != null) { if (interestLegResetDatesNode.Attributes["id"] != null) { interestLegResetDatesIDRef_ = interestLegResetDatesNode.Attributes["id"].Value; InterestLegResetDates ob = new InterestLegResetDates(interestLegResetDatesNode); IDManager.SetID(interestLegResetDatesIDRef_, ob); } else if (interestLegResetDatesNode.Attributes["href"] != null) { interestLegResetDatesIDRef_ = interestLegResetDatesNode.Attributes["href"].Value; } else { interestLegResetDates_ = new InterestLegResetDates(interestLegResetDatesNode); } } else { interestLegResetDates_ = new InterestLegResetDates(interestLegResetDatesNode); } } XmlNode interestLegPaymentDatesNode = xmlNode.SelectSingleNode("interestLegPaymentDates"); if (interestLegPaymentDatesNode != null) { if (interestLegPaymentDatesNode.Attributes["href"] != null || interestLegPaymentDatesNode.Attributes["id"] != null) { if (interestLegPaymentDatesNode.Attributes["id"] != null) { interestLegPaymentDatesIDRef_ = interestLegPaymentDatesNode.Attributes["id"].Value; AdjustableRelativeOrPeriodicDates2 ob = new AdjustableRelativeOrPeriodicDates2(interestLegPaymentDatesNode); IDManager.SetID(interestLegPaymentDatesIDRef_, ob); } else if (interestLegPaymentDatesNode.Attributes["href"] != null) { interestLegPaymentDatesIDRef_ = interestLegPaymentDatesNode.Attributes["href"].Value; } else { interestLegPaymentDates_ = new AdjustableRelativeOrPeriodicDates2(interestLegPaymentDatesNode); } } else { interestLegPaymentDates_ = new AdjustableRelativeOrPeriodicDates2(interestLegPaymentDatesNode); } } }
public SharedAmericanExercise(XmlNode xmlNode) : base(xmlNode) { XmlNodeList commencementDateNodeList = xmlNode.SelectNodes("commencementDate"); if (commencementDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in commencementDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { commencementDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(commencementDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { commencementDateIDRef = item.Attributes["href"].Name; } else { commencementDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList expirationDateNodeList = xmlNode.SelectNodes("expirationDate"); if (expirationDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in expirationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { expirationDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(expirationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { expirationDateIDRef = item.Attributes["href"].Name; } else { expirationDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList latestExerciseTimeNodeList = xmlNode.SelectNodes("latestExerciseTime"); if (latestExerciseTimeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in latestExerciseTimeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { latestExerciseTimeIDRef = item.Attributes["id"].Name; BusinessCenterTime ob = BusinessCenterTime(); IDManager.SetID(latestExerciseTimeIDRef, ob); } else if (item.Attributes.ToString() == "href") { latestExerciseTimeIDRef = item.Attributes["href"].Name; } else { latestExerciseTime = new BusinessCenterTime(item); } } } XmlNodeList latestExerciseTimeDeterminationNodeList = xmlNode.SelectNodes("latestExerciseTimeDetermination"); if (latestExerciseTimeDeterminationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in latestExerciseTimeDeterminationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { latestExerciseTimeDeterminationIDRef = item.Attributes["id"].Name; DeterminationMethod ob = DeterminationMethod(); IDManager.SetID(latestExerciseTimeDeterminationIDRef, ob); } else if (item.Attributes.ToString() == "href") { latestExerciseTimeDeterminationIDRef = item.Attributes["href"].Name; } else { latestExerciseTimeDetermination = new DeterminationMethod(item); } } } }
public FxDigitalOption(XmlNode xmlNode) : base(xmlNode) { XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate"); if (effectiveDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in effectiveDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { effectiveDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(effectiveDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { effectiveDateIDRef = item.Attributes["href"].Name; } else { effectiveDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList tenorPeriodNodeList = xmlNode.SelectNodes("tenorPeriod"); if (tenorPeriodNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in tenorPeriodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tenorPeriodIDRef = item.Attributes["id"].Name; Period ob = Period(); IDManager.SetID(tenorPeriodIDRef, ob); } else if (item.Attributes.ToString() == "href") { tenorPeriodIDRef = item.Attributes["href"].Name; } else { tenorPeriod = new Period(item); } } } XmlNodeList americanExerciseNodeList = xmlNode.SelectNodes("americanExercise"); if (americanExerciseNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in americanExerciseNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { americanExerciseIDRef = item.Attributes["id"].Name; FxDigitalAmericanExercise ob = FxDigitalAmericanExercise(); IDManager.SetID(americanExerciseIDRef, ob); } else if (item.Attributes.ToString() == "href") { americanExerciseIDRef = item.Attributes["href"].Name; } else { americanExercise = new FxDigitalAmericanExercise(item); } } } XmlNodeList touchNodeList = xmlNode.SelectNodes("touch"); foreach (XmlNode item in touchNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { touchIDRef = item.Attributes["id"].Name; List <FxTouch> ob = new List <FxTouch>(); ob.Add(new FxTouch(item)); IDManager.SetID(touchIDRef, ob); } else if (item.Attributes.ToString() == "href") { touchIDRef = item.Attributes["href"].Name; } else { touch.Add(new FxTouch(item)); } } } XmlNodeList europeanExerciseNodeList = xmlNode.SelectNodes("europeanExercise"); if (europeanExerciseNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in europeanExerciseNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { europeanExerciseIDRef = item.Attributes["id"].Name; FxEuropeanExercise ob = FxEuropeanExercise(); IDManager.SetID(europeanExerciseIDRef, ob); } else if (item.Attributes.ToString() == "href") { europeanExerciseIDRef = item.Attributes["href"].Name; } else { europeanExercise = new FxEuropeanExercise(item); } } } XmlNodeList triggerNodeList = xmlNode.SelectNodes("trigger"); foreach (XmlNode item in triggerNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { triggerIDRef = item.Attributes["id"].Name; List <FxTrigger> ob = new List <FxTrigger>(); ob.Add(new FxTrigger(item)); IDManager.SetID(triggerIDRef, ob); } else if (item.Attributes.ToString() == "href") { triggerIDRef = item.Attributes["href"].Name; } else { trigger.Add(new FxTrigger(item)); } } } XmlNodeList exerciseProcedureNodeList = xmlNode.SelectNodes("exerciseProcedure"); if (exerciseProcedureNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in exerciseProcedureNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { exerciseProcedureIDRef = item.Attributes["id"].Name; ExerciseProcedure ob = ExerciseProcedure(); IDManager.SetID(exerciseProcedureIDRef, ob); } else if (item.Attributes.ToString() == "href") { exerciseProcedureIDRef = item.Attributes["href"].Name; } else { exerciseProcedure = new ExerciseProcedure(item); } } } XmlNodeList payoutNodeList = xmlNode.SelectNodes("payout"); if (payoutNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in payoutNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { payoutIDRef = item.Attributes["id"].Name; FxOptionPayout ob = FxOptionPayout(); IDManager.SetID(payoutIDRef, ob); } else if (item.Attributes.ToString() == "href") { payoutIDRef = item.Attributes["href"].Name; } else { payout = new FxOptionPayout(item); } } } XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium"); foreach (XmlNode item in premiumNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { premiumIDRef = item.Attributes["id"].Name; List <FxOptionPremium> ob = new List <FxOptionPremium>(); ob.Add(new FxOptionPremium(item)); IDManager.SetID(premiumIDRef, ob); } else if (item.Attributes.ToString() == "href") { premiumIDRef = item.Attributes["href"].Name; } else { premium.Add(new FxOptionPremium(item)); } } } }
public EnvironmentalPhysicalLeg(XmlNode xmlNode) : base(xmlNode) { XmlNode numberOfAllowancesNode = xmlNode.SelectSingleNode("numberOfAllowances"); if (numberOfAllowancesNode != null) { if (numberOfAllowancesNode.Attributes["href"] != null || numberOfAllowancesNode.Attributes["id"] != null) { if (numberOfAllowancesNode.Attributes["id"] != null) { numberOfAllowancesIDRef_ = numberOfAllowancesNode.Attributes["id"].Value; UnitQuantity ob = new UnitQuantity(numberOfAllowancesNode); IDManager.SetID(numberOfAllowancesIDRef_, ob); } else if (numberOfAllowancesNode.Attributes["href"] != null) { numberOfAllowancesIDRef_ = numberOfAllowancesNode.Attributes["href"].Value; } else { numberOfAllowances_ = new UnitQuantity(numberOfAllowancesNode); } } else { numberOfAllowances_ = new UnitQuantity(numberOfAllowancesNode); } } XmlNode environmentalNode = xmlNode.SelectSingleNode("environmental"); if (environmentalNode != null) { if (environmentalNode.Attributes["href"] != null || environmentalNode.Attributes["id"] != null) { if (environmentalNode.Attributes["id"] != null) { environmentalIDRef_ = environmentalNode.Attributes["id"].Value; EnvironmentalProduct ob = new EnvironmentalProduct(environmentalNode); IDManager.SetID(environmentalIDRef_, ob); } else if (environmentalNode.Attributes["href"] != null) { environmentalIDRef_ = environmentalNode.Attributes["href"].Value; } else { environmental_ = new EnvironmentalProduct(environmentalNode); } } else { environmental_ = new EnvironmentalProduct(environmentalNode); } } XmlNode abandonmentOfSchemeNode = xmlNode.SelectSingleNode("abandonmentOfScheme"); if (abandonmentOfSchemeNode != null) { if (abandonmentOfSchemeNode.Attributes["href"] != null || abandonmentOfSchemeNode.Attributes["id"] != null) { if (abandonmentOfSchemeNode.Attributes["id"] != null) { abandonmentOfSchemeIDRef_ = abandonmentOfSchemeNode.Attributes["id"].Value; EnvironmentalAbandonmentOfSchemeEnum ob = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode); IDManager.SetID(abandonmentOfSchemeIDRef_, ob); } else if (abandonmentOfSchemeNode.Attributes["href"] != null) { abandonmentOfSchemeIDRef_ = abandonmentOfSchemeNode.Attributes["href"].Value; } else { abandonmentOfScheme_ = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode); } } else { abandonmentOfScheme_ = new EnvironmentalAbandonmentOfSchemeEnum(abandonmentOfSchemeNode); } } XmlNode deliveryDateNode = xmlNode.SelectSingleNode("deliveryDate"); if (deliveryDateNode != null) { if (deliveryDateNode.Attributes["href"] != null || deliveryDateNode.Attributes["id"] != null) { if (deliveryDateNode.Attributes["id"] != null) { deliveryDateIDRef_ = deliveryDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(deliveryDateNode); IDManager.SetID(deliveryDateIDRef_, ob); } else if (deliveryDateNode.Attributes["href"] != null) { deliveryDateIDRef_ = deliveryDateNode.Attributes["href"].Value; } else { deliveryDate_ = new AdjustableOrRelativeDate(deliveryDateNode); } } else { deliveryDate_ = new AdjustableOrRelativeDate(deliveryDateNode); } } XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate"); if (paymentDateNode != null) { if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null) { if (paymentDateNode.Attributes["id"] != null) { paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value; DateOffset ob = new DateOffset(paymentDateNode); IDManager.SetID(paymentDateIDRef_, ob); } else if (paymentDateNode.Attributes["href"] != null) { paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value; } else { paymentDate_ = new DateOffset(paymentDateNode); } } else { paymentDate_ = new DateOffset(paymentDateNode); } } XmlNode businessCentersReferenceNode = xmlNode.SelectSingleNode("businessCentersReference"); if (businessCentersReferenceNode != null) { if (businessCentersReferenceNode.Attributes["href"] != null || businessCentersReferenceNode.Attributes["id"] != null) { if (businessCentersReferenceNode.Attributes["id"] != null) { businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["id"].Value; BusinessCentersReference ob = new BusinessCentersReference(businessCentersReferenceNode); IDManager.SetID(businessCentersReferenceIDRef_, ob); } else if (businessCentersReferenceNode.Attributes["href"] != null) { businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["href"].Value; } else { businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode); } } else { businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode); } } XmlNode businessCentersNode = xmlNode.SelectSingleNode("businessCenters"); if (businessCentersNode != null) { if (businessCentersNode.Attributes["href"] != null || businessCentersNode.Attributes["id"] != null) { if (businessCentersNode.Attributes["id"] != null) { businessCentersIDRef_ = businessCentersNode.Attributes["id"].Value; BusinessCenters ob = new BusinessCenters(businessCentersNode); IDManager.SetID(businessCentersIDRef_, ob); } else if (businessCentersNode.Attributes["href"] != null) { businessCentersIDRef_ = businessCentersNode.Attributes["href"].Value; } else { businessCenters_ = new BusinessCenters(businessCentersNode); } } else { businessCenters_ = new BusinessCenters(businessCentersNode); } } XmlNode failureToDeliverApplicableNode = xmlNode.SelectSingleNode("failureToDeliverApplicable"); if (failureToDeliverApplicableNode != null) { if (failureToDeliverApplicableNode.Attributes["href"] != null || failureToDeliverApplicableNode.Attributes["id"] != null) { if (failureToDeliverApplicableNode.Attributes["id"] != null) { failureToDeliverApplicableIDRef_ = failureToDeliverApplicableNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(failureToDeliverApplicableNode); IDManager.SetID(failureToDeliverApplicableIDRef_, ob); } else if (failureToDeliverApplicableNode.Attributes["href"] != null) { failureToDeliverApplicableIDRef_ = failureToDeliverApplicableNode.Attributes["href"].Value; } else { failureToDeliverApplicable_ = new XsdTypeBoolean(failureToDeliverApplicableNode); } } else { failureToDeliverApplicable_ = new XsdTypeBoolean(failureToDeliverApplicableNode); } } XmlNode eEPParametersNode = xmlNode.SelectSingleNode("eEPParameters"); if (eEPParametersNode != null) { if (eEPParametersNode.Attributes["href"] != null || eEPParametersNode.Attributes["id"] != null) { if (eEPParametersNode.Attributes["id"] != null) { eEPParametersIDRef_ = eEPParametersNode.Attributes["id"].Value; EEPParameters ob = new EEPParameters(eEPParametersNode); IDManager.SetID(eEPParametersIDRef_, ob); } else if (eEPParametersNode.Attributes["href"] != null) { eEPParametersIDRef_ = eEPParametersNode.Attributes["href"].Value; } else { eEPParameters_ = new EEPParameters(eEPParametersNode); } } else { eEPParameters_ = new EEPParameters(eEPParametersNode); } } }
public FeaturePayment(XmlNode xmlNode) : base(xmlNode) { XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference"); if (payerPartyReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in payerPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { payerPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(payerPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { payerPartyReferenceIDRef = item.Attributes["href"].Name; } else { payerPartyReference = new PartyReference(item); } } } XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference"); if (payerAccountReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in payerAccountReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { payerAccountReferenceIDRef = item.Attributes["id"].Name; AccountReference ob = AccountReference(); IDManager.SetID(payerAccountReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { payerAccountReferenceIDRef = item.Attributes["href"].Name; } else { payerAccountReference = new AccountReference(item); } } } XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference"); if (receiverPartyReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in receiverPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { receiverPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(receiverPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { receiverPartyReferenceIDRef = item.Attributes["href"].Name; } else { receiverPartyReference = new PartyReference(item); } } } XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference"); if (receiverAccountReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in receiverAccountReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { receiverAccountReferenceIDRef = item.Attributes["id"].Name; AccountReference ob = AccountReference(); IDManager.SetID(receiverAccountReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { receiverAccountReferenceIDRef = item.Attributes["href"].Name; } else { receiverAccountReference = new AccountReference(item); } } } XmlNodeList levelPercentageNodeList = xmlNode.SelectNodes("levelPercentage"); if (levelPercentageNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in levelPercentageNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { levelPercentageIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(levelPercentageIDRef, ob); } else if (item.Attributes.ToString() == "href") { levelPercentageIDRef = item.Attributes["href"].Name; } else { levelPercentage = new XsdTypeDecimal(item); } } } XmlNodeList amountNodeList = xmlNode.SelectNodes("amount"); if (amountNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in amountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { amountIDRef = item.Attributes["id"].Name; NonNegativeDecimal ob = NonNegativeDecimal(); IDManager.SetID(amountIDRef, ob); } else if (item.Attributes.ToString() == "href") { amountIDRef = item.Attributes["href"].Name; } else { amount = new NonNegativeDecimal(item); } } } XmlNodeList timeNodeList = xmlNode.SelectNodes("time"); if (timeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in timeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { timeIDRef = item.Attributes["id"].Name; TimeTypeEnum ob = TimeTypeEnum(); IDManager.SetID(timeIDRef, ob); } else if (item.Attributes.ToString() == "href") { timeIDRef = item.Attributes["href"].Name; } else { time = new TimeTypeEnum(item); } } } XmlNodeList currencyNodeList = xmlNode.SelectNodes("currency"); if (currencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in currencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { currencyIDRef = item.Attributes["id"].Name; Currency ob = Currency(); IDManager.SetID(currencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { currencyIDRef = item.Attributes["href"].Name; } else { currency = new Currency(item); } } } XmlNodeList featurePaymentDateNodeList = xmlNode.SelectNodes("featurePaymentDate"); if (featurePaymentDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in featurePaymentDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { featurePaymentDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(featurePaymentDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { featurePaymentDateIDRef = item.Attributes["href"].Name; } else { featurePaymentDate = new AdjustableOrRelativeDate(item); } } } }
public ExchangeTradedContract(XmlNode xmlNode) : base(xmlNode) { XmlNodeList multiplierNodeList = xmlNode.SelectNodes("multiplier"); if (multiplierNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in multiplierNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { multiplierIDRef = item.Attributes["id"].Name; XsdTypePositiveInteger ob = XsdTypePositiveInteger(); IDManager.SetID(multiplierIDRef, ob); } else if (item.Attributes.ToString() == "href") { multiplierIDRef = item.Attributes["href"].Name; } else { multiplier = new XsdTypePositiveInteger(item); } } } XmlNodeList contractReferenceNodeList = xmlNode.SelectNodes("contractReference"); if (contractReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in contractReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { contractReferenceIDRef = item.Attributes["id"].Name; XsdTypeString ob = XsdTypeString(); IDManager.SetID(contractReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { contractReferenceIDRef = item.Attributes["href"].Name; } else { contractReference = new XsdTypeString(item); } } } XmlNodeList expirationDateNodeList = xmlNode.SelectNodes("expirationDate"); if (expirationDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in expirationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { expirationDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(expirationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { expirationDateIDRef = item.Attributes["href"].Name; } else { expirationDate = new AdjustableOrRelativeDate(item); } } } }
public FxDigitalOption(XmlNode xmlNode) : base(xmlNode) { XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate"); if (effectiveDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in effectiveDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { effectiveDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(effectiveDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { effectiveDateIDRef = item.Attributes["href"].Name; } else { effectiveDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList tenorPeriodNodeList = xmlNode.SelectNodes("tenorPeriod"); if (tenorPeriodNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in tenorPeriodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tenorPeriodIDRef = item.Attributes["id"].Name; Period ob = Period(); IDManager.SetID(tenorPeriodIDRef, ob); } else if (item.Attributes.ToString() == "href") { tenorPeriodIDRef = item.Attributes["href"].Name; } else { tenorPeriod = new Period(item); } } } XmlNodeList americanExerciseNodeList = xmlNode.SelectNodes("americanExercise"); if (americanExerciseNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in americanExerciseNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { americanExerciseIDRef = item.Attributes["id"].Name; FxDigitalAmericanExercise ob = FxDigitalAmericanExercise(); IDManager.SetID(americanExerciseIDRef, ob); } else if (item.Attributes.ToString() == "href") { americanExerciseIDRef = item.Attributes["href"].Name; } else { americanExercise = new FxDigitalAmericanExercise(item); } } } XmlNodeList touchNodeList = xmlNode.SelectNodes("touch"); foreach (XmlNode item in touchNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { touchIDRef = item.Attributes["id"].Name; List<FxTouch> ob = new List<FxTouch>(); ob.Add(new FxTouch(item)); IDManager.SetID(touchIDRef, ob); } else if (item.Attributes.ToString() == "href") { touchIDRef = item.Attributes["href"].Name; } else { touch.Add(new FxTouch(item)); } } } XmlNodeList europeanExerciseNodeList = xmlNode.SelectNodes("europeanExercise"); if (europeanExerciseNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in europeanExerciseNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { europeanExerciseIDRef = item.Attributes["id"].Name; FxEuropeanExercise ob = FxEuropeanExercise(); IDManager.SetID(europeanExerciseIDRef, ob); } else if (item.Attributes.ToString() == "href") { europeanExerciseIDRef = item.Attributes["href"].Name; } else { europeanExercise = new FxEuropeanExercise(item); } } } XmlNodeList triggerNodeList = xmlNode.SelectNodes("trigger"); foreach (XmlNode item in triggerNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { triggerIDRef = item.Attributes["id"].Name; List<FxTrigger> ob = new List<FxTrigger>(); ob.Add(new FxTrigger(item)); IDManager.SetID(triggerIDRef, ob); } else if (item.Attributes.ToString() == "href") { triggerIDRef = item.Attributes["href"].Name; } else { trigger.Add(new FxTrigger(item)); } } } XmlNodeList exerciseProcedureNodeList = xmlNode.SelectNodes("exerciseProcedure"); if (exerciseProcedureNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in exerciseProcedureNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { exerciseProcedureIDRef = item.Attributes["id"].Name; ExerciseProcedure ob = ExerciseProcedure(); IDManager.SetID(exerciseProcedureIDRef, ob); } else if (item.Attributes.ToString() == "href") { exerciseProcedureIDRef = item.Attributes["href"].Name; } else { exerciseProcedure = new ExerciseProcedure(item); } } } XmlNodeList payoutNodeList = xmlNode.SelectNodes("payout"); if (payoutNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in payoutNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { payoutIDRef = item.Attributes["id"].Name; FxOptionPayout ob = FxOptionPayout(); IDManager.SetID(payoutIDRef, ob); } else if (item.Attributes.ToString() == "href") { payoutIDRef = item.Attributes["href"].Name; } else { payout = new FxOptionPayout(item); } } } XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium"); foreach (XmlNode item in premiumNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { premiumIDRef = item.Attributes["id"].Name; List<FxOptionPremium> ob = new List<FxOptionPremium>(); ob.Add(new FxOptionPremium(item)); IDManager.SetID(premiumIDRef, ob); } else if (item.Attributes.ToString() == "href") { premiumIDRef = item.Attributes["href"].Name; } else { premium.Add(new FxOptionPremium(item)); } } } }
public EnvironmentalPhysicalLeg(XmlNode xmlNode) : base(xmlNode) { XmlNodeList numberOfAllowancesNodeList = xmlNode.SelectNodes("numberOfAllowances"); if (numberOfAllowancesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in numberOfAllowancesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { numberOfAllowancesIDRef = item.Attributes["id"].Name; UnitQuantity ob = UnitQuantity(); IDManager.SetID(numberOfAllowancesIDRef, ob); } else if (item.Attributes.ToString() == "href") { numberOfAllowancesIDRef = item.Attributes["href"].Name; } else { numberOfAllowances = new UnitQuantity(item); } } } XmlNodeList environmentalNodeList = xmlNode.SelectNodes("environmental"); if (environmentalNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in environmentalNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { environmentalIDRef = item.Attributes["id"].Name; EnvironmentalProduct ob = EnvironmentalProduct(); IDManager.SetID(environmentalIDRef, ob); } else if (item.Attributes.ToString() == "href") { environmentalIDRef = item.Attributes["href"].Name; } else { environmental = new EnvironmentalProduct(item); } } } XmlNodeList abandonmentOfSchemeNodeList = xmlNode.SelectNodes("abandonmentOfScheme"); if (abandonmentOfSchemeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in abandonmentOfSchemeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { abandonmentOfSchemeIDRef = item.Attributes["id"].Name; EnvironmentalAbandonmentOfSchemeEnum ob = EnvironmentalAbandonmentOfSchemeEnum(); IDManager.SetID(abandonmentOfSchemeIDRef, ob); } else if (item.Attributes.ToString() == "href") { abandonmentOfSchemeIDRef = item.Attributes["href"].Name; } else { abandonmentOfScheme = new EnvironmentalAbandonmentOfSchemeEnum(item); } } } XmlNodeList deliveryDateNodeList = xmlNode.SelectNodes("deliveryDate"); if (deliveryDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in deliveryDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deliveryDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(deliveryDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { deliveryDateIDRef = item.Attributes["href"].Name; } else { deliveryDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate"); if (paymentDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in paymentDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentDateIDRef = item.Attributes["id"].Name; DateOffset ob = DateOffset(); IDManager.SetID(paymentDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentDateIDRef = item.Attributes["href"].Name; } else { paymentDate = new DateOffset(item); } } } XmlNodeList businessCentersReferenceNodeList = xmlNode.SelectNodes("businessCentersReference"); if (businessCentersReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in businessCentersReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { businessCentersReferenceIDRef = item.Attributes["id"].Name; BusinessCentersReference ob = BusinessCentersReference(); IDManager.SetID(businessCentersReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { businessCentersReferenceIDRef = item.Attributes["href"].Name; } else { businessCentersReference = new BusinessCentersReference(item); } } } XmlNodeList businessCentersNodeList = xmlNode.SelectNodes("businessCenters"); if (businessCentersNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in businessCentersNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { businessCentersIDRef = item.Attributes["id"].Name; BusinessCenters ob = BusinessCenters(); IDManager.SetID(businessCentersIDRef, ob); } else if (item.Attributes.ToString() == "href") { businessCentersIDRef = item.Attributes["href"].Name; } else { businessCenters = new BusinessCenters(item); } } } XmlNodeList failureToDeliverApplicableNodeList = xmlNode.SelectNodes("failureToDeliverApplicable"); if (failureToDeliverApplicableNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in failureToDeliverApplicableNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { failureToDeliverApplicableIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(failureToDeliverApplicableIDRef, ob); } else if (item.Attributes.ToString() == "href") { failureToDeliverApplicableIDRef = item.Attributes["href"].Name; } else { failureToDeliverApplicable = new XsdTypeBoolean(item); } } } XmlNodeList eEPParametersNodeList = xmlNode.SelectNodes("eEPParameters"); if (eEPParametersNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in eEPParametersNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { eEPParametersIDRef = item.Attributes["id"].Name; EEPParameters ob = EEPParameters(); IDManager.SetID(eEPParametersIDRef, ob); } else if (item.Attributes.ToString() == "href") { eEPParametersIDRef = item.Attributes["href"].Name; } else { eEPParameters = new EEPParameters(item); } } } }
public CalculatedAmount(XmlNode xmlNode) { XmlNodeList calculationDatesNodeList = xmlNode.SelectNodes("calculationDates"); if (calculationDatesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in calculationDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationDatesIDRef = item.Attributes["id"].Name; AdjustableRelativeOrPeriodicDates ob = AdjustableRelativeOrPeriodicDates(); IDManager.SetID(calculationDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationDatesIDRef = item.Attributes["href"].Name; } else { calculationDates = new AdjustableRelativeOrPeriodicDates(item); } } } XmlNodeList observationStartDateNodeList = xmlNode.SelectNodes("observationStartDate"); if (observationStartDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in observationStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { observationStartDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(observationStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { observationStartDateIDRef = item.Attributes["href"].Name; } else { observationStartDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList optionsExchangeDividendsNodeList = xmlNode.SelectNodes("optionsExchangeDividends"); if (optionsExchangeDividendsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in optionsExchangeDividendsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { optionsExchangeDividendsIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(optionsExchangeDividendsIDRef, ob); } else if (item.Attributes.ToString() == "href") { optionsExchangeDividendsIDRef = item.Attributes["href"].Name; } else { optionsExchangeDividends = new XsdTypeBoolean(item); } } } XmlNodeList additionalDividendsNodeList = xmlNode.SelectNodes("additionalDividends"); if (additionalDividendsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in additionalDividendsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { additionalDividendsIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(additionalDividendsIDRef, ob); } else if (item.Attributes.ToString() == "href") { additionalDividendsIDRef = item.Attributes["href"].Name; } else { additionalDividends = new XsdTypeBoolean(item); } } } XmlNodeList allDividendsNodeList = xmlNode.SelectNodes("allDividends"); if (allDividendsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in allDividendsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { allDividendsIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(allDividendsIDRef, ob); } else if (item.Attributes.ToString() == "href") { allDividendsIDRef = item.Attributes["href"].Name; } else { allDividends = new XsdTypeBoolean(item); } } } }
public CommodityPhysicalEuropeanExercise(XmlNode xmlNode) : base(xmlNode) { XmlNodeList expirationDateNodeList = xmlNode.SelectNodes("expirationDate"); if (expirationDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in expirationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { expirationDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(expirationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { expirationDateIDRef = item.Attributes["href"].Name; } else { expirationDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList expirationDatesNodeList = xmlNode.SelectNodes("expirationDates"); if (expirationDatesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in expirationDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { expirationDatesIDRef = item.Attributes["id"].Name; AdjustableRelativeOrPeriodicDates2 ob = AdjustableRelativeOrPeriodicDates2(); IDManager.SetID(expirationDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { expirationDatesIDRef = item.Attributes["href"].Name; } else { expirationDates = new AdjustableRelativeOrPeriodicDates2(item); } } } XmlNodeList relativeExpirationDatesNodeList = xmlNode.SelectNodes("relativeExpirationDates"); if (relativeExpirationDatesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in relativeExpirationDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { relativeExpirationDatesIDRef = item.Attributes["id"].Name; CommodityRelativeExpirationDates ob = CommodityRelativeExpirationDates(); IDManager.SetID(relativeExpirationDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { relativeExpirationDatesIDRef = item.Attributes["href"].Name; } else { relativeExpirationDates = new CommodityRelativeExpirationDates(item); } } } XmlNodeList expirationTimeNodeList = xmlNode.SelectNodes("expirationTime"); if (expirationTimeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in expirationTimeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { expirationTimeIDRef = item.Attributes["id"].Name; PrevailingTime ob = PrevailingTime(); IDManager.SetID(expirationTimeIDRef, ob); } else if (item.Attributes.ToString() == "href") { expirationTimeIDRef = item.Attributes["href"].Name; } else { expirationTime = new PrevailingTime(item); } } } }
public PrincipalExchangeDescriptions(XmlNode xmlNode) { XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference"); if (payerPartyReferenceNode != null) { if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) { if (payerPartyReferenceNode.Attributes["id"] != null) { payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(payerPartyReferenceNode); IDManager.SetID(payerPartyReferenceIDRef_, ob); } else if (payerPartyReferenceNode.Attributes["href"] != null) { payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value; } else { payerPartyReference_ = new PartyReference(payerPartyReferenceNode); } } else { payerPartyReference_ = new PartyReference(payerPartyReferenceNode); } } XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference"); if (payerAccountReferenceNode != null) { if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) { if (payerAccountReferenceNode.Attributes["id"] != null) { payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value; AccountReference ob = new AccountReference(payerAccountReferenceNode); IDManager.SetID(payerAccountReferenceIDRef_, ob); } else if (payerAccountReferenceNode.Attributes["href"] != null) { payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value; } else { payerAccountReference_ = new AccountReference(payerAccountReferenceNode); } } else { payerAccountReference_ = new AccountReference(payerAccountReferenceNode); } } XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference"); if (receiverPartyReferenceNode != null) { if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) { if (receiverPartyReferenceNode.Attributes["id"] != null) { receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(receiverPartyReferenceNode); IDManager.SetID(receiverPartyReferenceIDRef_, ob); } else if (receiverPartyReferenceNode.Attributes["href"] != null) { receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value; } else { receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode); } } else { receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode); } } XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference"); if (receiverAccountReferenceNode != null) { if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) { if (receiverAccountReferenceNode.Attributes["id"] != null) { receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value; AccountReference ob = new AccountReference(receiverAccountReferenceNode); IDManager.SetID(receiverAccountReferenceIDRef_, ob); } else if (receiverAccountReferenceNode.Attributes["href"] != null) { receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value; } else { receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode); } } else { receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode); } } XmlNode principalExchangeAmountNode = xmlNode.SelectSingleNode("principalExchangeAmount"); if (principalExchangeAmountNode != null) { if (principalExchangeAmountNode.Attributes["href"] != null || principalExchangeAmountNode.Attributes["id"] != null) { if (principalExchangeAmountNode.Attributes["id"] != null) { principalExchangeAmountIDRef_ = principalExchangeAmountNode.Attributes["id"].Value; PrincipalExchangeAmount ob = new PrincipalExchangeAmount(principalExchangeAmountNode); IDManager.SetID(principalExchangeAmountIDRef_, ob); } else if (principalExchangeAmountNode.Attributes["href"] != null) { principalExchangeAmountIDRef_ = principalExchangeAmountNode.Attributes["href"].Value; } else { principalExchangeAmount_ = new PrincipalExchangeAmount(principalExchangeAmountNode); } } else { principalExchangeAmount_ = new PrincipalExchangeAmount(principalExchangeAmountNode); } } XmlNode principalExchangeDateNode = xmlNode.SelectSingleNode("principalExchangeDate"); if (principalExchangeDateNode != null) { if (principalExchangeDateNode.Attributes["href"] != null || principalExchangeDateNode.Attributes["id"] != null) { if (principalExchangeDateNode.Attributes["id"] != null) { principalExchangeDateIDRef_ = principalExchangeDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(principalExchangeDateNode); IDManager.SetID(principalExchangeDateIDRef_, ob); } else if (principalExchangeDateNode.Attributes["href"] != null) { principalExchangeDateIDRef_ = principalExchangeDateNode.Attributes["href"].Value; } else { principalExchangeDate_ = new AdjustableOrRelativeDate(principalExchangeDateNode); } } else { principalExchangeDate_ = new AdjustableOrRelativeDate(principalExchangeDateNode); } } }
public PaymentDetail(XmlNode xmlNode) : base(xmlNode) { XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate"); if (paymentDateNode != null) { if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null) { if (paymentDateNode.Attributes["id"] != null) { paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(paymentDateNode); IDManager.SetID(paymentDateIDRef_, ob); } else if (paymentDateNode.Attributes["href"] != null) { paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value; } else { paymentDate_ = new AdjustableOrRelativeDate(paymentDateNode); } } else { paymentDate_ = new AdjustableOrRelativeDate(paymentDateNode); } } XmlNode paymentAmountNode = xmlNode.SelectSingleNode("paymentAmount"); if (paymentAmountNode != null) { if (paymentAmountNode.Attributes["href"] != null || paymentAmountNode.Attributes["id"] != null) { if (paymentAmountNode.Attributes["id"] != null) { paymentAmountIDRef_ = paymentAmountNode.Attributes["id"].Value; Money ob = new Money(paymentAmountNode); IDManager.SetID(paymentAmountIDRef_, ob); } else if (paymentAmountNode.Attributes["href"] != null) { paymentAmountIDRef_ = paymentAmountNode.Attributes["href"].Value; } else { paymentAmount_ = new Money(paymentAmountNode); } } else { paymentAmount_ = new Money(paymentAmountNode); } } XmlNode paymentRuleNode = xmlNode.SelectSingleNode("paymentRule"); if (paymentRuleNode != null) { if (paymentRuleNode.Attributes["href"] != null || paymentRuleNode.Attributes["id"] != null) { if (paymentRuleNode.Attributes["id"] != null) { paymentRuleIDRef_ = paymentRuleNode.Attributes["id"].Value; PaymentRule ob = new PaymentRule(paymentRuleNode); IDManager.SetID(paymentRuleIDRef_, ob); } else if (paymentRuleNode.Attributes["href"] != null) { paymentRuleIDRef_ = paymentRuleNode.Attributes["href"].Value; } else { paymentRule_ = new PaymentRule(paymentRuleNode); } } else { paymentRule_ = new PaymentRule(paymentRuleNode); } } }
public PrincipalExchangeDescriptions(XmlNode xmlNode) { XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference"); if (payerPartyReferenceNode != null) { if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) { if (payerPartyReferenceNode.Attributes["id"] != null) { payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(payerPartyReferenceNode); IDManager.SetID(payerPartyReferenceIDRef_, ob); } else if (payerPartyReferenceNode.Attributes["href"] != null) { payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value; } else { payerPartyReference_ = new PartyReference(payerPartyReferenceNode); } } else { payerPartyReference_ = new PartyReference(payerPartyReferenceNode); } } XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference"); if (payerAccountReferenceNode != null) { if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) { if (payerAccountReferenceNode.Attributes["id"] != null) { payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value; AccountReference ob = new AccountReference(payerAccountReferenceNode); IDManager.SetID(payerAccountReferenceIDRef_, ob); } else if (payerAccountReferenceNode.Attributes["href"] != null) { payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value; } else { payerAccountReference_ = new AccountReference(payerAccountReferenceNode); } } else { payerAccountReference_ = new AccountReference(payerAccountReferenceNode); } } XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference"); if (receiverPartyReferenceNode != null) { if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) { if (receiverPartyReferenceNode.Attributes["id"] != null) { receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(receiverPartyReferenceNode); IDManager.SetID(receiverPartyReferenceIDRef_, ob); } else if (receiverPartyReferenceNode.Attributes["href"] != null) { receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value; } else { receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode); } } else { receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode); } } XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference"); if (receiverAccountReferenceNode != null) { if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) { if (receiverAccountReferenceNode.Attributes["id"] != null) { receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value; AccountReference ob = new AccountReference(receiverAccountReferenceNode); IDManager.SetID(receiverAccountReferenceIDRef_, ob); } else if (receiverAccountReferenceNode.Attributes["href"] != null) { receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value; } else { receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode); } } else { receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode); } } XmlNode principalExchangeAmountNode = xmlNode.SelectSingleNode("principalExchangeAmount"); if (principalExchangeAmountNode != null) { if (principalExchangeAmountNode.Attributes["href"] != null || principalExchangeAmountNode.Attributes["id"] != null) { if (principalExchangeAmountNode.Attributes["id"] != null) { principalExchangeAmountIDRef_ = principalExchangeAmountNode.Attributes["id"].Value; PrincipalExchangeAmount ob = new PrincipalExchangeAmount(principalExchangeAmountNode); IDManager.SetID(principalExchangeAmountIDRef_, ob); } else if (principalExchangeAmountNode.Attributes["href"] != null) { principalExchangeAmountIDRef_ = principalExchangeAmountNode.Attributes["href"].Value; } else { principalExchangeAmount_ = new PrincipalExchangeAmount(principalExchangeAmountNode); } } else { principalExchangeAmount_ = new PrincipalExchangeAmount(principalExchangeAmountNode); } } XmlNode principalExchangeDateNode = xmlNode.SelectSingleNode("principalExchangeDate"); if (principalExchangeDateNode != null) { if (principalExchangeDateNode.Attributes["href"] != null || principalExchangeDateNode.Attributes["id"] != null) { if (principalExchangeDateNode.Attributes["id"] != null) { principalExchangeDateIDRef_ = principalExchangeDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(principalExchangeDateNode); IDManager.SetID(principalExchangeDateIDRef_, ob); } else if (principalExchangeDateNode.Attributes["href"] != null) { principalExchangeDateIDRef_ = principalExchangeDateNode.Attributes["href"].Value; } else { principalExchangeDate_ = new AdjustableOrRelativeDate(principalExchangeDateNode); } } else { principalExchangeDate_ = new AdjustableOrRelativeDate(principalExchangeDateNode); } } }
public ReturnSwapAdditionalPayment(XmlNode xmlNode) : base(xmlNode) { XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference"); if (payerPartyReferenceNode != null) { if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) { if (payerPartyReferenceNode.Attributes["id"] != null) { payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(payerPartyReferenceNode); IDManager.SetID(payerPartyReferenceIDRef_, ob); } else if (payerPartyReferenceNode.Attributes["href"] != null) { payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value; } else { payerPartyReference_ = new PartyReference(payerPartyReferenceNode); } } else { payerPartyReference_ = new PartyReference(payerPartyReferenceNode); } } XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference"); if (payerAccountReferenceNode != null) { if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) { if (payerAccountReferenceNode.Attributes["id"] != null) { payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value; AccountReference ob = new AccountReference(payerAccountReferenceNode); IDManager.SetID(payerAccountReferenceIDRef_, ob); } else if (payerAccountReferenceNode.Attributes["href"] != null) { payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value; } else { payerAccountReference_ = new AccountReference(payerAccountReferenceNode); } } else { payerAccountReference_ = new AccountReference(payerAccountReferenceNode); } } XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference"); if (receiverPartyReferenceNode != null) { if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) { if (receiverPartyReferenceNode.Attributes["id"] != null) { receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value; PartyReference ob = new PartyReference(receiverPartyReferenceNode); IDManager.SetID(receiverPartyReferenceIDRef_, ob); } else if (receiverPartyReferenceNode.Attributes["href"] != null) { receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value; } else { receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode); } } else { receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode); } } XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference"); if (receiverAccountReferenceNode != null) { if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) { if (receiverAccountReferenceNode.Attributes["id"] != null) { receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value; AccountReference ob = new AccountReference(receiverAccountReferenceNode); IDManager.SetID(receiverAccountReferenceIDRef_, ob); } else if (receiverAccountReferenceNode.Attributes["href"] != null) { receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value; } else { receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode); } } else { receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode); } } XmlNode additionalPaymentAmountNode = xmlNode.SelectSingleNode("additionalPaymentAmount"); if (additionalPaymentAmountNode != null) { if (additionalPaymentAmountNode.Attributes["href"] != null || additionalPaymentAmountNode.Attributes["id"] != null) { if (additionalPaymentAmountNode.Attributes["id"] != null) { additionalPaymentAmountIDRef_ = additionalPaymentAmountNode.Attributes["id"].Value; AdditionalPaymentAmount ob = new AdditionalPaymentAmount(additionalPaymentAmountNode); IDManager.SetID(additionalPaymentAmountIDRef_, ob); } else if (additionalPaymentAmountNode.Attributes["href"] != null) { additionalPaymentAmountIDRef_ = additionalPaymentAmountNode.Attributes["href"].Value; } else { additionalPaymentAmount_ = new AdditionalPaymentAmount(additionalPaymentAmountNode); } } else { additionalPaymentAmount_ = new AdditionalPaymentAmount(additionalPaymentAmountNode); } } XmlNode additionalPaymentDateNode = xmlNode.SelectSingleNode("additionalPaymentDate"); if (additionalPaymentDateNode != null) { if (additionalPaymentDateNode.Attributes["href"] != null || additionalPaymentDateNode.Attributes["id"] != null) { if (additionalPaymentDateNode.Attributes["id"] != null) { additionalPaymentDateIDRef_ = additionalPaymentDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(additionalPaymentDateNode); IDManager.SetID(additionalPaymentDateIDRef_, ob); } else if (additionalPaymentDateNode.Attributes["href"] != null) { additionalPaymentDateIDRef_ = additionalPaymentDateNode.Attributes["href"].Value; } else { additionalPaymentDate_ = new AdjustableOrRelativeDate(additionalPaymentDateNode); } } else { additionalPaymentDate_ = new AdjustableOrRelativeDate(additionalPaymentDateNode); } } XmlNode paymentTypeNode = xmlNode.SelectSingleNode("paymentType"); if (paymentTypeNode != null) { if (paymentTypeNode.Attributes["href"] != null || paymentTypeNode.Attributes["id"] != null) { if (paymentTypeNode.Attributes["id"] != null) { paymentTypeIDRef_ = paymentTypeNode.Attributes["id"].Value; PaymentType ob = new PaymentType(paymentTypeNode); IDManager.SetID(paymentTypeIDRef_, ob); } else if (paymentTypeNode.Attributes["href"] != null) { paymentTypeIDRef_ = paymentTypeNode.Attributes["href"].Value; } else { paymentType_ = new PaymentType(paymentTypeNode); } } else { paymentType_ = new PaymentType(paymentTypeNode); } } }
public DirectionalLeg(XmlNode xmlNode) : base(xmlNode) { XmlNodeList legIdentifierNodeList = xmlNode.SelectNodes("legIdentifier"); foreach (XmlNode item in legIdentifierNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { legIdentifierIDRef = item.Attributes["id"].Name; List <LegIdentifier> ob = new List <LegIdentifier>(); ob.Add(new LegIdentifier(item)); IDManager.SetID(legIdentifierIDRef, ob); } else if (item.Attributes.ToString() == "href") { legIdentifierIDRef = item.Attributes["href"].Name; } else { legIdentifier.Add(new LegIdentifier(item)); } } } XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference"); if (payerPartyReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in payerPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { payerPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(payerPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { payerPartyReferenceIDRef = item.Attributes["href"].Name; } else { payerPartyReference = new PartyReference(item); } } } XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference"); if (payerAccountReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in payerAccountReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { payerAccountReferenceIDRef = item.Attributes["id"].Name; AccountReference ob = AccountReference(); IDManager.SetID(payerAccountReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { payerAccountReferenceIDRef = item.Attributes["href"].Name; } else { payerAccountReference = new AccountReference(item); } } } XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference"); if (receiverPartyReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in receiverPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { receiverPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(receiverPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { receiverPartyReferenceIDRef = item.Attributes["href"].Name; } else { receiverPartyReference = new PartyReference(item); } } } XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference"); if (receiverAccountReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in receiverAccountReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { receiverAccountReferenceIDRef = item.Attributes["id"].Name; AccountReference ob = AccountReference(); IDManager.SetID(receiverAccountReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { receiverAccountReferenceIDRef = item.Attributes["href"].Name; } else { receiverAccountReference = new AccountReference(item); } } } XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate"); if (effectiveDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in effectiveDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { effectiveDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(effectiveDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { effectiveDateIDRef = item.Attributes["href"].Name; } else { effectiveDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList terminationDateNodeList = xmlNode.SelectNodes("terminationDate"); if (terminationDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in terminationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { terminationDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(terminationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { terminationDateIDRef = item.Attributes["href"].Name; } else { terminationDate = new AdjustableOrRelativeDate(item); } } } }
public FxDigitalOption(XmlNode xmlNode) : base(xmlNode) { XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate"); if (effectiveDateNode != null) { if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) { if (effectiveDateNode.Attributes["id"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value; AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(effectiveDateNode); IDManager.SetID(effectiveDateIDRef_, ob); } else if (effectiveDateNode.Attributes["href"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value; } else { effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode); } } else { effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode); } } XmlNode tenorPeriodNode = xmlNode.SelectSingleNode("tenorPeriod"); if (tenorPeriodNode != null) { if (tenorPeriodNode.Attributes["href"] != null || tenorPeriodNode.Attributes["id"] != null) { if (tenorPeriodNode.Attributes["id"] != null) { tenorPeriodIDRef_ = tenorPeriodNode.Attributes["id"].Value; Period ob = new Period(tenorPeriodNode); IDManager.SetID(tenorPeriodIDRef_, ob); } else if (tenorPeriodNode.Attributes["href"] != null) { tenorPeriodIDRef_ = tenorPeriodNode.Attributes["href"].Value; } else { tenorPeriod_ = new Period(tenorPeriodNode); } } else { tenorPeriod_ = new Period(tenorPeriodNode); } } XmlNode americanExerciseNode = xmlNode.SelectSingleNode("americanExercise"); if (americanExerciseNode != null) { if (americanExerciseNode.Attributes["href"] != null || americanExerciseNode.Attributes["id"] != null) { if (americanExerciseNode.Attributes["id"] != null) { americanExerciseIDRef_ = americanExerciseNode.Attributes["id"].Value; FxDigitalAmericanExercise ob = new FxDigitalAmericanExercise(americanExerciseNode); IDManager.SetID(americanExerciseIDRef_, ob); } else if (americanExerciseNode.Attributes["href"] != null) { americanExerciseIDRef_ = americanExerciseNode.Attributes["href"].Value; } else { americanExercise_ = new FxDigitalAmericanExercise(americanExerciseNode); } } else { americanExercise_ = new FxDigitalAmericanExercise(americanExerciseNode); } } XmlNodeList touchNodeList = xmlNode.SelectNodes("touch"); if (touchNodeList != null) { this.touch_ = new List<FxTouch>(); foreach (XmlNode item in touchNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { touchIDRef_ = item.Attributes["id"].Value; touch_.Add(new FxTouch(item)); IDManager.SetID(touchIDRef_, touch_[touch_.Count - 1 ]); } else if (item.Attributes["href"] != null) { touchIDRef_ = item.Attributes["href"].Value; } else { touch_.Add(new FxTouch(item)); } } else { touch_.Add(new FxTouch(item)); } } } XmlNode europeanExerciseNode = xmlNode.SelectSingleNode("europeanExercise"); if (europeanExerciseNode != null) { if (europeanExerciseNode.Attributes["href"] != null || europeanExerciseNode.Attributes["id"] != null) { if (europeanExerciseNode.Attributes["id"] != null) { europeanExerciseIDRef_ = europeanExerciseNode.Attributes["id"].Value; FxEuropeanExercise ob = new FxEuropeanExercise(europeanExerciseNode); IDManager.SetID(europeanExerciseIDRef_, ob); } else if (europeanExerciseNode.Attributes["href"] != null) { europeanExerciseIDRef_ = europeanExerciseNode.Attributes["href"].Value; } else { europeanExercise_ = new FxEuropeanExercise(europeanExerciseNode); } } else { europeanExercise_ = new FxEuropeanExercise(europeanExerciseNode); } } XmlNodeList triggerNodeList = xmlNode.SelectNodes("trigger"); if (triggerNodeList != null) { this.trigger_ = new List<FxTrigger>(); foreach (XmlNode item in triggerNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { triggerIDRef_ = item.Attributes["id"].Value; trigger_.Add(new FxTrigger(item)); IDManager.SetID(triggerIDRef_, trigger_[trigger_.Count - 1 ]); } else if (item.Attributes["href"] != null) { triggerIDRef_ = item.Attributes["href"].Value; } else { trigger_.Add(new FxTrigger(item)); } } else { trigger_.Add(new FxTrigger(item)); } } } XmlNode exerciseProcedureNode = xmlNode.SelectSingleNode("exerciseProcedure"); if (exerciseProcedureNode != null) { if (exerciseProcedureNode.Attributes["href"] != null || exerciseProcedureNode.Attributes["id"] != null) { if (exerciseProcedureNode.Attributes["id"] != null) { exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["id"].Value; ExerciseProcedure ob = new ExerciseProcedure(exerciseProcedureNode); IDManager.SetID(exerciseProcedureIDRef_, ob); } else if (exerciseProcedureNode.Attributes["href"] != null) { exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["href"].Value; } else { exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode); } } else { exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode); } } XmlNode payoutNode = xmlNode.SelectSingleNode("payout"); if (payoutNode != null) { if (payoutNode.Attributes["href"] != null || payoutNode.Attributes["id"] != null) { if (payoutNode.Attributes["id"] != null) { payoutIDRef_ = payoutNode.Attributes["id"].Value; FxOptionPayout ob = new FxOptionPayout(payoutNode); IDManager.SetID(payoutIDRef_, ob); } else if (payoutNode.Attributes["href"] != null) { payoutIDRef_ = payoutNode.Attributes["href"].Value; } else { payout_ = new FxOptionPayout(payoutNode); } } else { payout_ = new FxOptionPayout(payoutNode); } } XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium"); if (premiumNodeList != null) { this.premium_ = new List<FxOptionPremium>(); foreach (XmlNode item in premiumNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { premiumIDRef_ = item.Attributes["id"].Value; premium_.Add(new FxOptionPremium(item)); IDManager.SetID(premiumIDRef_, premium_[premium_.Count - 1 ]); } else if (item.Attributes["href"] != null) { premiumIDRef_ = item.Attributes["href"].Value; } else { premium_.Add(new FxOptionPremium(item)); } } else { premium_.Add(new FxOptionPremium(item)); } } } }
public PaymentDetail(XmlNode xmlNode) : base(xmlNode) { XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate"); if (paymentDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in paymentDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(paymentDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentDateIDRef = item.Attributes["href"].Name; } else { paymentDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList paymentAmountNodeList = xmlNode.SelectNodes("paymentAmount"); if (paymentAmountNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in paymentAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentAmountIDRef = item.Attributes["id"].Name; Money ob = Money(); IDManager.SetID(paymentAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentAmountIDRef = item.Attributes["href"].Name; } else { paymentAmount = new Money(item); } } } XmlNodeList paymentRuleNodeList = xmlNode.SelectNodes("paymentRule"); if (paymentRuleNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in paymentRuleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentRuleIDRef = item.Attributes["id"].Name; PaymentRule ob = PaymentRule(); IDManager.SetID(paymentRuleIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentRuleIDRef = item.Attributes["href"].Name; } else { paymentRule = new PaymentRule(item); } } } }
public CommodityOption(XmlNode xmlNode) : base(xmlNode) { XmlNodeList buyerPartyReferenceNodeList = xmlNode.SelectNodes("buyerPartyReference"); if (buyerPartyReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in buyerPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { buyerPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(buyerPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { buyerPartyReferenceIDRef = item.Attributes["href"].Name; } else { buyerPartyReference = new PartyReference(item); } } } XmlNodeList buyerAccountReferenceNodeList = xmlNode.SelectNodes("buyerAccountReference"); if (buyerAccountReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in buyerAccountReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { buyerAccountReferenceIDRef = item.Attributes["id"].Name; AccountReference ob = AccountReference(); IDManager.SetID(buyerAccountReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { buyerAccountReferenceIDRef = item.Attributes["href"].Name; } else { buyerAccountReference = new AccountReference(item); } } } XmlNodeList sellerPartyReferenceNodeList = xmlNode.SelectNodes("sellerPartyReference"); if (sellerPartyReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in sellerPartyReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { sellerPartyReferenceIDRef = item.Attributes["id"].Name; PartyReference ob = PartyReference(); IDManager.SetID(sellerPartyReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { sellerPartyReferenceIDRef = item.Attributes["href"].Name; } else { sellerPartyReference = new PartyReference(item); } } } XmlNodeList sellerAccountReferenceNodeList = xmlNode.SelectNodes("sellerAccountReference"); if (sellerAccountReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in sellerAccountReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { sellerAccountReferenceIDRef = item.Attributes["id"].Name; AccountReference ob = AccountReference(); IDManager.SetID(sellerAccountReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { sellerAccountReferenceIDRef = item.Attributes["href"].Name; } else { sellerAccountReference = new AccountReference(item); } } } XmlNodeList optionTypeNodeList = xmlNode.SelectNodes("optionType"); if (optionTypeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in optionTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { optionTypeIDRef = item.Attributes["id"].Name; PutCallEnum ob = PutCallEnum(); IDManager.SetID(optionTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { optionTypeIDRef = item.Attributes["href"].Name; } else { optionType = new PutCallEnum(item); } } } XmlNodeList commodityNodeList = xmlNode.SelectNodes("commodity"); if (commodityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in commodityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { commodityIDRef = item.Attributes["id"].Name; Commodity ob = Commodity(); IDManager.SetID(commodityIDRef, ob); } else if (item.Attributes.ToString() == "href") { commodityIDRef = item.Attributes["href"].Name; } else { commodity = new Commodity(item); } } } XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate"); if (effectiveDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in effectiveDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { effectiveDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(effectiveDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { effectiveDateIDRef = item.Attributes["href"].Name; } else { effectiveDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList terminationDateNodeList = xmlNode.SelectNodes("terminationDate"); if (terminationDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in terminationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { terminationDateIDRef = item.Attributes["id"].Name; AdjustableOrRelativeDate ob = AdjustableOrRelativeDate(); IDManager.SetID(terminationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { terminationDateIDRef = item.Attributes["href"].Name; } else { terminationDate = new AdjustableOrRelativeDate(item); } } } XmlNodeList calculationPeriodsScheduleNodeList = xmlNode.SelectNodes("calculationPeriodsSchedule"); if (calculationPeriodsScheduleNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationPeriodsScheduleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodsScheduleIDRef = item.Attributes["id"].Name; CommodityCalculationPeriodsSchedule ob = CommodityCalculationPeriodsSchedule(); IDManager.SetID(calculationPeriodsScheduleIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodsScheduleIDRef = item.Attributes["href"].Name; } else { calculationPeriodsSchedule = new CommodityCalculationPeriodsSchedule(item); } } } XmlNodeList calculationPeriodsNodeList = xmlNode.SelectNodes("calculationPeriods"); if (calculationPeriodsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationPeriodsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodsIDRef = item.Attributes["id"].Name; AdjustableDates ob = AdjustableDates(); IDManager.SetID(calculationPeriodsIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodsIDRef = item.Attributes["href"].Name; } else { calculationPeriods = new AdjustableDates(item); } } } XmlNodeList pricingDatesNodeList = xmlNode.SelectNodes("pricingDates"); if (pricingDatesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in pricingDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { pricingDatesIDRef = item.Attributes["id"].Name; CommodityPricingDates ob = CommodityPricingDates(); IDManager.SetID(pricingDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { pricingDatesIDRef = item.Attributes["href"].Name; } else { pricingDates = new CommodityPricingDates(item); } } } XmlNodeList averagingMethodNodeList = xmlNode.SelectNodes("averagingMethod"); if (averagingMethodNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in averagingMethodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { averagingMethodIDRef = item.Attributes["id"].Name; AveragingMethodEnum ob = AveragingMethodEnum(); IDManager.SetID(averagingMethodIDRef, ob); } else if (item.Attributes.ToString() == "href") { averagingMethodIDRef = item.Attributes["href"].Name; } else { averagingMethod = new AveragingMethodEnum(item); } } } XmlNodeList notionalQuantityScheduleNodeList = xmlNode.SelectNodes("notionalQuantitySchedule"); if (notionalQuantityScheduleNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in notionalQuantityScheduleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { notionalQuantityScheduleIDRef = item.Attributes["id"].Name; CommodityNotionalQuantitySchedule ob = CommodityNotionalQuantitySchedule(); IDManager.SetID(notionalQuantityScheduleIDRef, ob); } else if (item.Attributes.ToString() == "href") { notionalQuantityScheduleIDRef = item.Attributes["href"].Name; } else { notionalQuantitySchedule = new CommodityNotionalQuantitySchedule(item); } } } XmlNodeList notionalQuantityNodeList = xmlNode.SelectNodes("notionalQuantity"); if (notionalQuantityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in notionalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { notionalQuantityIDRef = item.Attributes["id"].Name; CommodityNotionalQuantity ob = CommodityNotionalQuantity(); IDManager.SetID(notionalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { notionalQuantityIDRef = item.Attributes["href"].Name; } else { notionalQuantity = new CommodityNotionalQuantity(item); } } } XmlNodeList settlementPeriodsNotionalQuantityNodeList = xmlNode.SelectNodes("settlementPeriodsNotionalQuantity"); foreach (XmlNode item in settlementPeriodsNotionalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { settlementPeriodsNotionalQuantityIDRef = item.Attributes["id"].Name; List<CommoditySettlementPeriodsNotionalQuantity> ob = new List<CommoditySettlementPeriodsNotionalQuantity>(); ob.Add(new CommoditySettlementPeriodsNotionalQuantity(item)); IDManager.SetID(settlementPeriodsNotionalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { settlementPeriodsNotionalQuantityIDRef = item.Attributes["href"].Name; } else { settlementPeriodsNotionalQuantity.Add(new CommoditySettlementPeriodsNotionalQuantity(item)); } } } XmlNodeList totalNotionalQuantityNodeList = xmlNode.SelectNodes("totalNotionalQuantity"); if (totalNotionalQuantityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in totalNotionalQuantityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { totalNotionalQuantityIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(totalNotionalQuantityIDRef, ob); } else if (item.Attributes.ToString() == "href") { totalNotionalQuantityIDRef = item.Attributes["href"].Name; } else { totalNotionalQuantity = new XsdTypeDecimal(item); } } } XmlNodeList quantityReferenceNodeList = xmlNode.SelectNodes("quantityReference"); if (quantityReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in quantityReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { quantityReferenceIDRef = item.Attributes["id"].Name; QuantityReference ob = QuantityReference(); IDManager.SetID(quantityReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { quantityReferenceIDRef = item.Attributes["href"].Name; } else { quantityReference = new QuantityReference(item); } } } XmlNodeList exerciseNodeList = xmlNode.SelectNodes("exercise"); if (exerciseNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in exerciseNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { exerciseIDRef = item.Attributes["id"].Name; CommodityExercise ob = CommodityExercise(); IDManager.SetID(exerciseIDRef, ob); } else if (item.Attributes.ToString() == "href") { exerciseIDRef = item.Attributes["href"].Name; } else { exercise = new CommodityExercise(item); } } } XmlNodeList strikePricePerUnitNodeList = xmlNode.SelectNodes("strikePricePerUnit"); if (strikePricePerUnitNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in strikePricePerUnitNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { strikePricePerUnitIDRef = item.Attributes["id"].Name; NonNegativeMoney ob = NonNegativeMoney(); IDManager.SetID(strikePricePerUnitIDRef, ob); } else if (item.Attributes.ToString() == "href") { strikePricePerUnitIDRef = item.Attributes["href"].Name; } else { strikePricePerUnit = new NonNegativeMoney(item); } } } XmlNodeList strikePricePerUnitScheduleNodeList = xmlNode.SelectNodes("strikePricePerUnitSchedule"); if (strikePricePerUnitScheduleNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in strikePricePerUnitScheduleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { strikePricePerUnitScheduleIDRef = item.Attributes["id"].Name; CommodityStrikeSchedule ob = CommodityStrikeSchedule(); IDManager.SetID(strikePricePerUnitScheduleIDRef, ob); } else if (item.Attributes.ToString() == "href") { strikePricePerUnitScheduleIDRef = item.Attributes["href"].Name; } else { strikePricePerUnitSchedule = new CommodityStrikeSchedule(item); } } } XmlNodeList floatingStrikePricePerUnitNodeList = xmlNode.SelectNodes("floatingStrikePricePerUnit"); if (floatingStrikePricePerUnitNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in floatingStrikePricePerUnitNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { floatingStrikePricePerUnitIDRef = item.Attributes["id"].Name; FloatingStrikePrice ob = FloatingStrikePrice(); IDManager.SetID(floatingStrikePricePerUnitIDRef, ob); } else if (item.Attributes.ToString() == "href") { floatingStrikePricePerUnitIDRef = item.Attributes["href"].Name; } else { floatingStrikePricePerUnit = new FloatingStrikePrice(item); } } } XmlNodeList floatingStrikePricePerUnitScheduleNodeList = xmlNode.SelectNodes("floatingStrikePricePerUnitSchedule"); if (floatingStrikePricePerUnitScheduleNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in floatingStrikePricePerUnitScheduleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { floatingStrikePricePerUnitScheduleIDRef = item.Attributes["id"].Name; CommodityCalculationPeriodsSchedule ob = CommodityCalculationPeriodsSchedule(); IDManager.SetID(floatingStrikePricePerUnitScheduleIDRef, ob); } else if (item.Attributes.ToString() == "href") { floatingStrikePricePerUnitScheduleIDRef = item.Attributes["href"].Name; } else { floatingStrikePricePerUnitSchedule = new CommodityCalculationPeriodsSchedule(item); } } } XmlNodeList commoditySwapNodeList = xmlNode.SelectNodes("commoditySwap"); if (commoditySwapNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in commoditySwapNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { commoditySwapIDRef = item.Attributes["id"].Name; CommoditySwap ob = CommoditySwap(); IDManager.SetID(commoditySwapIDRef, ob); } else if (item.Attributes.ToString() == "href") { commoditySwapIDRef = item.Attributes["href"].Name; } else { commoditySwap = new CommoditySwap(item); } } } XmlNodeList commodityForwardNodeList = xmlNode.SelectNodes("commodityForward"); if (commodityForwardNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in commodityForwardNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { commodityForwardIDRef = item.Attributes["id"].Name; CommodityForward ob = CommodityForward(); IDManager.SetID(commodityForwardIDRef, ob); } else if (item.Attributes.ToString() == "href") { commodityForwardIDRef = item.Attributes["href"].Name; } else { commodityForward = new CommodityForward(item); } } } XmlNodeList physicalExerciseNodeList = xmlNode.SelectNodes("physicalExercise"); if (physicalExerciseNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in physicalExerciseNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalExerciseIDRef = item.Attributes["id"].Name; CommodityPhysicalExercise ob = CommodityPhysicalExercise(); IDManager.SetID(physicalExerciseIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalExerciseIDRef = item.Attributes["href"].Name; } else { physicalExercise = new CommodityPhysicalExercise(item); } } } XmlNodeList weatherCalculationPeriodsNodeList = xmlNode.SelectNodes("weatherCalculationPeriods"); if (weatherCalculationPeriodsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in weatherCalculationPeriodsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { weatherCalculationPeriodsIDRef = item.Attributes["id"].Name; WeatherCalculationPeriods ob = WeatherCalculationPeriods(); IDManager.SetID(weatherCalculationPeriodsIDRef, ob); } else if (item.Attributes.ToString() == "href") { weatherCalculationPeriodsIDRef = item.Attributes["href"].Name; } else { weatherCalculationPeriods = new WeatherCalculationPeriods(item); } } } XmlNodeList weatherCalculationPeriodsReferenceNodeList = xmlNode.SelectNodes("weatherCalculationPeriodsReference"); if (weatherCalculationPeriodsReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in weatherCalculationPeriodsReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { weatherCalculationPeriodsReferenceIDRef = item.Attributes["id"].Name; CalculationPeriodsReference ob = CalculationPeriodsReference(); IDManager.SetID(weatherCalculationPeriodsReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { weatherCalculationPeriodsReferenceIDRef = item.Attributes["href"].Name; } else { weatherCalculationPeriodsReference = new CalculationPeriodsReference(item); } } } XmlNodeList weatherNotionalAmountNodeList = xmlNode.SelectNodes("weatherNotionalAmount"); if (weatherNotionalAmountNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in weatherNotionalAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { weatherNotionalAmountIDRef = item.Attributes["id"].Name; NonNegativeMoney ob = NonNegativeMoney(); IDManager.SetID(weatherNotionalAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { weatherNotionalAmountIDRef = item.Attributes["href"].Name; } else { weatherNotionalAmount = new NonNegativeMoney(item); } } } XmlNodeList weatherIndexStrikeLevelNodeList = xmlNode.SelectNodes("weatherIndexStrikeLevel"); if (weatherIndexStrikeLevelNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in weatherIndexStrikeLevelNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { weatherIndexStrikeLevelIDRef = item.Attributes["id"].Name; WeatherIndex ob = WeatherIndex(); IDManager.SetID(weatherIndexStrikeLevelIDRef, ob); } else if (item.Attributes.ToString() == "href") { weatherIndexStrikeLevelIDRef = item.Attributes["href"].Name; } else { weatherIndexStrikeLevel = new WeatherIndex(item); } } } XmlNodeList calculationNodeList = xmlNode.SelectNodes("calculation"); if (calculationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationIDRef = item.Attributes["id"].Name; WeatherLegCalculation ob = WeatherLegCalculation(); IDManager.SetID(calculationIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationIDRef = item.Attributes["href"].Name; } else { calculation = new WeatherLegCalculation(item); } } } XmlNodeList weatherIndexDataNodeList = xmlNode.SelectNodes("weatherIndexData"); if (weatherIndexDataNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in weatherIndexDataNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { weatherIndexDataIDRef = item.Attributes["id"].Name; WeatherIndexData ob = WeatherIndexData(); IDManager.SetID(weatherIndexDataIDRef, ob); } else if (item.Attributes.ToString() == "href") { weatherIndexDataIDRef = item.Attributes["href"].Name; } else { weatherIndexData = new WeatherIndexData(item); } } } XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium"); foreach (XmlNode item in premiumNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { premiumIDRef = item.Attributes["id"].Name; List<CommodityPremium> ob = new List<CommodityPremium>(); ob.Add(new CommodityPremium(item)); IDManager.SetID(premiumIDRef, ob); } else if (item.Attributes.ToString() == "href") { premiumIDRef = item.Attributes["href"].Name; } else { premium.Add(new CommodityPremium(item)); } } } XmlNodeList commonPricingNodeList = xmlNode.SelectNodes("commonPricing"); if (commonPricingNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in commonPricingNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { commonPricingIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(commonPricingIDRef, ob); } else if (item.Attributes.ToString() == "href") { commonPricingIDRef = item.Attributes["href"].Name; } else { commonPricing = new XsdTypeBoolean(item); } } } XmlNodeList marketDisruptionNodeList = xmlNode.SelectNodes("marketDisruption"); if (marketDisruptionNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in marketDisruptionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { marketDisruptionIDRef = item.Attributes["id"].Name; CommodityMarketDisruption ob = CommodityMarketDisruption(); IDManager.SetID(marketDisruptionIDRef, ob); } else if (item.Attributes.ToString() == "href") { marketDisruptionIDRef = item.Attributes["href"].Name; } else { marketDisruption = new CommodityMarketDisruption(item); } } } XmlNodeList settlementDisruptionNodeList = xmlNode.SelectNodes("settlementDisruption"); if (settlementDisruptionNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in settlementDisruptionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { settlementDisruptionIDRef = item.Attributes["id"].Name; CommodityBullionSettlementDisruptionEnum ob = CommodityBullionSettlementDisruptionEnum(); IDManager.SetID(settlementDisruptionIDRef, ob); } else if (item.Attributes.ToString() == "href") { settlementDisruptionIDRef = item.Attributes["href"].Name; } else { settlementDisruption = new CommodityBullionSettlementDisruptionEnum(item); } } } XmlNodeList roundingNodeList = xmlNode.SelectNodes("rounding"); if (roundingNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in roundingNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { roundingIDRef = item.Attributes["id"].Name; Rounding ob = Rounding(); IDManager.SetID(roundingIDRef, ob); } else if (item.Attributes.ToString() == "href") { roundingIDRef = item.Attributes["href"].Name; } else { rounding = new Rounding(item); } } } }