public FxLinkedNotionalSchedule(XmlNode xmlNode) { XmlNode constantNotionalScheduleReferenceNode = xmlNode.SelectSingleNode("constantNotionalScheduleReference"); if (constantNotionalScheduleReferenceNode != null) { if (constantNotionalScheduleReferenceNode.Attributes["href"] != null || constantNotionalScheduleReferenceNode.Attributes["id"] != null) { if (constantNotionalScheduleReferenceNode.Attributes["id"] != null) { constantNotionalScheduleReferenceIDRef_ = constantNotionalScheduleReferenceNode.Attributes["id"].Value; NotionalReference ob = new NotionalReference(constantNotionalScheduleReferenceNode); IDManager.SetID(constantNotionalScheduleReferenceIDRef_, ob); } else if (constantNotionalScheduleReferenceNode.Attributes["href"] != null) { constantNotionalScheduleReferenceIDRef_ = constantNotionalScheduleReferenceNode.Attributes["href"].Value; } else { constantNotionalScheduleReference_ = new NotionalReference(constantNotionalScheduleReferenceNode); } } else { constantNotionalScheduleReference_ = new NotionalReference(constantNotionalScheduleReferenceNode); } } XmlNode initialValueNode = xmlNode.SelectSingleNode("initialValue"); if (initialValueNode != null) { if (initialValueNode.Attributes["href"] != null || initialValueNode.Attributes["id"] != null) { if (initialValueNode.Attributes["id"] != null) { initialValueIDRef_ = initialValueNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(initialValueNode); IDManager.SetID(initialValueIDRef_, ob); } else if (initialValueNode.Attributes["href"] != null) { initialValueIDRef_ = initialValueNode.Attributes["href"].Value; } else { initialValue_ = new XsdTypeDecimal(initialValueNode); } } else { initialValue_ = new XsdTypeDecimal(initialValueNode); } } XmlNode varyingNotionalCurrencyNode = xmlNode.SelectSingleNode("varyingNotionalCurrency"); if (varyingNotionalCurrencyNode != null) { if (varyingNotionalCurrencyNode.Attributes["href"] != null || varyingNotionalCurrencyNode.Attributes["id"] != null) { if (varyingNotionalCurrencyNode.Attributes["id"] != null) { varyingNotionalCurrencyIDRef_ = varyingNotionalCurrencyNode.Attributes["id"].Value; Currency ob = new Currency(varyingNotionalCurrencyNode); IDManager.SetID(varyingNotionalCurrencyIDRef_, ob); } else if (varyingNotionalCurrencyNode.Attributes["href"] != null) { varyingNotionalCurrencyIDRef_ = varyingNotionalCurrencyNode.Attributes["href"].Value; } else { varyingNotionalCurrency_ = new Currency(varyingNotionalCurrencyNode); } } else { varyingNotionalCurrency_ = new Currency(varyingNotionalCurrencyNode); } } XmlNode varyingNotionalFixingDatesNode = xmlNode.SelectSingleNode("varyingNotionalFixingDates"); if (varyingNotionalFixingDatesNode != null) { if (varyingNotionalFixingDatesNode.Attributes["href"] != null || varyingNotionalFixingDatesNode.Attributes["id"] != null) { if (varyingNotionalFixingDatesNode.Attributes["id"] != null) { varyingNotionalFixingDatesIDRef_ = varyingNotionalFixingDatesNode.Attributes["id"].Value; RelativeDateOffset ob = new RelativeDateOffset(varyingNotionalFixingDatesNode); IDManager.SetID(varyingNotionalFixingDatesIDRef_, ob); } else if (varyingNotionalFixingDatesNode.Attributes["href"] != null) { varyingNotionalFixingDatesIDRef_ = varyingNotionalFixingDatesNode.Attributes["href"].Value; } else { varyingNotionalFixingDates_ = new RelativeDateOffset(varyingNotionalFixingDatesNode); } } else { varyingNotionalFixingDates_ = new RelativeDateOffset(varyingNotionalFixingDatesNode); } } XmlNode fxSpotRateSourceNode = xmlNode.SelectSingleNode("fxSpotRateSource"); if (fxSpotRateSourceNode != null) { if (fxSpotRateSourceNode.Attributes["href"] != null || fxSpotRateSourceNode.Attributes["id"] != null) { if (fxSpotRateSourceNode.Attributes["id"] != null) { fxSpotRateSourceIDRef_ = fxSpotRateSourceNode.Attributes["id"].Value; FxSpotRateSource ob = new FxSpotRateSource(fxSpotRateSourceNode); IDManager.SetID(fxSpotRateSourceIDRef_, ob); } else if (fxSpotRateSourceNode.Attributes["href"] != null) { fxSpotRateSourceIDRef_ = fxSpotRateSourceNode.Attributes["href"].Value; } else { fxSpotRateSource_ = new FxSpotRateSource(fxSpotRateSourceNode); } } else { fxSpotRateSource_ = new FxSpotRateSource(fxSpotRateSourceNode); } } XmlNode varyingNotionalInterimExchangePaymentDatesNode = xmlNode.SelectSingleNode("varyingNotionalInterimExchangePaymentDates"); if (varyingNotionalInterimExchangePaymentDatesNode != null) { if (varyingNotionalInterimExchangePaymentDatesNode.Attributes["href"] != null || varyingNotionalInterimExchangePaymentDatesNode.Attributes["id"] != null) { if (varyingNotionalInterimExchangePaymentDatesNode.Attributes["id"] != null) { varyingNotionalInterimExchangePaymentDatesIDRef_ = varyingNotionalInterimExchangePaymentDatesNode.Attributes["id"].Value; RelativeDateOffset ob = new RelativeDateOffset(varyingNotionalInterimExchangePaymentDatesNode); IDManager.SetID(varyingNotionalInterimExchangePaymentDatesIDRef_, ob); } else if (varyingNotionalInterimExchangePaymentDatesNode.Attributes["href"] != null) { varyingNotionalInterimExchangePaymentDatesIDRef_ = varyingNotionalInterimExchangePaymentDatesNode.Attributes["href"].Value; } else { varyingNotionalInterimExchangePaymentDates_ = new RelativeDateOffset(varyingNotionalInterimExchangePaymentDatesNode); } } else { varyingNotionalInterimExchangePaymentDates_ = new RelativeDateOffset(varyingNotionalInterimExchangePaymentDatesNode); } } }
public FxLinkedNotionalSchedule(XmlNode xmlNode) { XmlNodeList constantNotionalScheduleReferenceNodeList = xmlNode.SelectNodes("constantNotionalScheduleReference"); if (constantNotionalScheduleReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in constantNotionalScheduleReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { constantNotionalScheduleReferenceIDRef = item.Attributes["id"].Name; NotionalReference ob = NotionalReference(); IDManager.SetID(constantNotionalScheduleReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { constantNotionalScheduleReferenceIDRef = item.Attributes["href"].Name; } else { constantNotionalScheduleReference = new NotionalReference(item); } } } XmlNodeList initialValueNodeList = xmlNode.SelectNodes("initialValue"); if (initialValueNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in initialValueNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { initialValueIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(initialValueIDRef, ob); } else if (item.Attributes.ToString() == "href") { initialValueIDRef = item.Attributes["href"].Name; } else { initialValue = new XsdTypeDecimal(item); } } } XmlNodeList varyingNotionalCurrencyNodeList = xmlNode.SelectNodes("varyingNotionalCurrency"); if (varyingNotionalCurrencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in varyingNotionalCurrencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { varyingNotionalCurrencyIDRef = item.Attributes["id"].Name; Currency ob = Currency(); IDManager.SetID(varyingNotionalCurrencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { varyingNotionalCurrencyIDRef = item.Attributes["href"].Name; } else { varyingNotionalCurrency = new Currency(item); } } } XmlNodeList varyingNotionalFixingDatesNodeList = xmlNode.SelectNodes("varyingNotionalFixingDates"); if (varyingNotionalFixingDatesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in varyingNotionalFixingDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { varyingNotionalFixingDatesIDRef = item.Attributes["id"].Name; RelativeDateOffset ob = RelativeDateOffset(); IDManager.SetID(varyingNotionalFixingDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { varyingNotionalFixingDatesIDRef = item.Attributes["href"].Name; } else { varyingNotionalFixingDates = new RelativeDateOffset(item); } } } XmlNodeList fxSpotRateSourceNodeList = xmlNode.SelectNodes("fxSpotRateSource"); if (fxSpotRateSourceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in fxSpotRateSourceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { fxSpotRateSourceIDRef = item.Attributes["id"].Name; FxSpotRateSource ob = FxSpotRateSource(); IDManager.SetID(fxSpotRateSourceIDRef, ob); } else if (item.Attributes.ToString() == "href") { fxSpotRateSourceIDRef = item.Attributes["href"].Name; } else { fxSpotRateSource = new FxSpotRateSource(item); } } } XmlNodeList varyingNotionalInterimExchangePaymentDatesNodeList = xmlNode.SelectNodes("varyingNotionalInterimExchangePaymentDates"); if (varyingNotionalInterimExchangePaymentDatesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in varyingNotionalInterimExchangePaymentDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { varyingNotionalInterimExchangePaymentDatesIDRef = item.Attributes["id"].Name; RelativeDateOffset ob = RelativeDateOffset(); IDManager.SetID(varyingNotionalInterimExchangePaymentDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { varyingNotionalInterimExchangePaymentDatesIDRef = item.Attributes["href"].Name; } else { varyingNotionalInterimExchangePaymentDates = new RelativeDateOffset(item); } } } }
public ExerciseFee(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 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; NotionalReference ob = new NotionalReference(notionalReferenceNode); IDManager.SetID(notionalReferenceIDRef_, ob); } else if (notionalReferenceNode.Attributes["href"] != null) { notionalReferenceIDRef_ = notionalReferenceNode.Attributes["href"].Value; } else { notionalReference_ = new NotionalReference(notionalReferenceNode); } } else { notionalReference_ = new NotionalReference(notionalReferenceNode); } } XmlNode feeAmountNode = xmlNode.SelectSingleNode("feeAmount"); if (feeAmountNode != null) { if (feeAmountNode.Attributes["href"] != null || feeAmountNode.Attributes["id"] != null) { if (feeAmountNode.Attributes["id"] != null) { feeAmountIDRef_ = feeAmountNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(feeAmountNode); IDManager.SetID(feeAmountIDRef_, ob); } else if (feeAmountNode.Attributes["href"] != null) { feeAmountIDRef_ = feeAmountNode.Attributes["href"].Value; } else { feeAmount_ = new XsdTypeDecimal(feeAmountNode); } } else { feeAmount_ = new XsdTypeDecimal(feeAmountNode); } } XmlNode feeRateNode = xmlNode.SelectSingleNode("feeRate"); if (feeRateNode != null) { if (feeRateNode.Attributes["href"] != null || feeRateNode.Attributes["id"] != null) { if (feeRateNode.Attributes["id"] != null) { feeRateIDRef_ = feeRateNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(feeRateNode); IDManager.SetID(feeRateIDRef_, ob); } else if (feeRateNode.Attributes["href"] != null) { feeRateIDRef_ = feeRateNode.Attributes["href"].Value; } else { feeRate_ = new XsdTypeDecimal(feeRateNode); } } else { feeRate_ = new XsdTypeDecimal(feeRateNode); } } XmlNode feePaymentDateNode = xmlNode.SelectSingleNode("feePaymentDate"); if (feePaymentDateNode != null) { if (feePaymentDateNode.Attributes["href"] != null || feePaymentDateNode.Attributes["id"] != null) { if (feePaymentDateNode.Attributes["id"] != null) { feePaymentDateIDRef_ = feePaymentDateNode.Attributes["id"].Value; RelativeDateOffset ob = new RelativeDateOffset(feePaymentDateNode); IDManager.SetID(feePaymentDateIDRef_, ob); } else if (feePaymentDateNode.Attributes["href"] != null) { feePaymentDateIDRef_ = feePaymentDateNode.Attributes["href"].Value; } else { feePaymentDate_ = new RelativeDateOffset(feePaymentDateNode); } } else { feePaymentDate_ = new RelativeDateOffset(feePaymentDateNode); } } }
public ExerciseFee(XmlNode 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 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; NotionalReference ob = NotionalReference(); IDManager.SetID(notionalReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { notionalReferenceIDRef = item.Attributes["href"].Name; } else { notionalReference = new NotionalReference(item); } } } XmlNodeList feeAmountNodeList = xmlNode.SelectNodes("feeAmount"); if (feeAmountNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in feeAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { feeAmountIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(feeAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { feeAmountIDRef = item.Attributes["href"].Name; } else { feeAmount = new XsdTypeDecimal(item); } } } XmlNodeList feeRateNodeList = xmlNode.SelectNodes("feeRate"); if (feeRateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in feeRateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { feeRateIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(feeRateIDRef, ob); } else if (item.Attributes.ToString() == "href") { feeRateIDRef = item.Attributes["href"].Name; } else { feeRate = new XsdTypeDecimal(item); } } } XmlNodeList feePaymentDateNodeList = xmlNode.SelectNodes("feePaymentDate"); if (feePaymentDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in feePaymentDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { feePaymentDateIDRef = item.Attributes["id"].Name; RelativeDateOffset ob = RelativeDateOffset(); IDManager.SetID(feePaymentDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { feePaymentDateIDRef = item.Attributes["href"].Name; } else { feePaymentDate = new RelativeDateOffset(item); } } } }
public FxLinkedNotionalSchedule(XmlNode xmlNode) { XmlNodeList constantNotionalScheduleReferenceNodeList = xmlNode.SelectNodes("constantNotionalScheduleReference"); if (constantNotionalScheduleReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in constantNotionalScheduleReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { constantNotionalScheduleReferenceIDRef = item.Attributes["id"].Name; NotionalReference ob = NotionalReference(); IDManager.SetID(constantNotionalScheduleReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { constantNotionalScheduleReferenceIDRef = item.Attributes["href"].Name; } else { constantNotionalScheduleReference = new NotionalReference(item); } } } XmlNodeList initialValueNodeList = xmlNode.SelectNodes("initialValue"); if (initialValueNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in initialValueNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { initialValueIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(initialValueIDRef, ob); } else if (item.Attributes.ToString() == "href") { initialValueIDRef = item.Attributes["href"].Name; } else { initialValue = new XsdTypeDecimal(item); } } } XmlNodeList varyingNotionalCurrencyNodeList = xmlNode.SelectNodes("varyingNotionalCurrency"); if (varyingNotionalCurrencyNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in varyingNotionalCurrencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { varyingNotionalCurrencyIDRef = item.Attributes["id"].Name; Currency ob = Currency(); IDManager.SetID(varyingNotionalCurrencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { varyingNotionalCurrencyIDRef = item.Attributes["href"].Name; } else { varyingNotionalCurrency = new Currency(item); } } } XmlNodeList varyingNotionalFixingDatesNodeList = xmlNode.SelectNodes("varyingNotionalFixingDates"); if (varyingNotionalFixingDatesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in varyingNotionalFixingDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { varyingNotionalFixingDatesIDRef = item.Attributes["id"].Name; RelativeDateOffset ob = RelativeDateOffset(); IDManager.SetID(varyingNotionalFixingDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { varyingNotionalFixingDatesIDRef = item.Attributes["href"].Name; } else { varyingNotionalFixingDates = new RelativeDateOffset(item); } } } XmlNodeList fxSpotRateSourceNodeList = xmlNode.SelectNodes("fxSpotRateSource"); if (fxSpotRateSourceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in fxSpotRateSourceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { fxSpotRateSourceIDRef = item.Attributes["id"].Name; FxSpotRateSource ob = FxSpotRateSource(); IDManager.SetID(fxSpotRateSourceIDRef, ob); } else if (item.Attributes.ToString() == "href") { fxSpotRateSourceIDRef = item.Attributes["href"].Name; } else { fxSpotRateSource = new FxSpotRateSource(item); } } } XmlNodeList varyingNotionalInterimExchangePaymentDatesNodeList = xmlNode.SelectNodes("varyingNotionalInterimExchangePaymentDates"); if (varyingNotionalInterimExchangePaymentDatesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in varyingNotionalInterimExchangePaymentDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { varyingNotionalInterimExchangePaymentDatesIDRef = item.Attributes["id"].Name; RelativeDateOffset ob = RelativeDateOffset(); IDManager.SetID(varyingNotionalInterimExchangePaymentDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { varyingNotionalInterimExchangePaymentDatesIDRef = item.Attributes["href"].Name; } else { varyingNotionalInterimExchangePaymentDates = new RelativeDateOffset(item); } } } }
public ExerciseFee(XmlNode 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 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; NotionalReference ob = NotionalReference(); IDManager.SetID(notionalReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { notionalReferenceIDRef = item.Attributes["href"].Name; } else { notionalReference = new NotionalReference(item); } } } XmlNodeList feeAmountNodeList = xmlNode.SelectNodes("feeAmount"); if (feeAmountNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in feeAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { feeAmountIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(feeAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { feeAmountIDRef = item.Attributes["href"].Name; } else { feeAmount = new XsdTypeDecimal(item); } } } XmlNodeList feeRateNodeList = xmlNode.SelectNodes("feeRate"); if (feeRateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in feeRateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { feeRateIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(feeRateIDRef, ob); } else if (item.Attributes.ToString() == "href") { feeRateIDRef = item.Attributes["href"].Name; } else { feeRate = new XsdTypeDecimal(item); } } } XmlNodeList feePaymentDateNodeList = xmlNode.SelectNodes("feePaymentDate"); if (feePaymentDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in feePaymentDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { feePaymentDateIDRef = item.Attributes["id"].Name; RelativeDateOffset ob = RelativeDateOffset(); IDManager.SetID(feePaymentDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { feePaymentDateIDRef = item.Attributes["href"].Name; } else { feePaymentDate = new RelativeDateOffset(item); } } } }