public GeneralTerms(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; AdjustableDate2 ob = new AdjustableDate2(effectiveDateNode); IDManager.SetID(effectiveDateIDRef_, ob); } else if (effectiveDateNode.Attributes["href"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value; } else { effectiveDate_ = new AdjustableDate2(effectiveDateNode); } } else { effectiveDate_ = new AdjustableDate2(effectiveDateNode); } } XmlNode scheduledTerminationDateNode = xmlNode.SelectSingleNode("scheduledTerminationDate"); if (scheduledTerminationDateNode != null) { if (scheduledTerminationDateNode.Attributes["href"] != null || scheduledTerminationDateNode.Attributes["id"] != null) { if (scheduledTerminationDateNode.Attributes["id"] != null) { scheduledTerminationDateIDRef_ = scheduledTerminationDateNode.Attributes["id"].Value; AdjustableDate2 ob = new AdjustableDate2(scheduledTerminationDateNode); IDManager.SetID(scheduledTerminationDateIDRef_, ob); } else if (scheduledTerminationDateNode.Attributes["href"] != null) { scheduledTerminationDateIDRef_ = scheduledTerminationDateNode.Attributes["href"].Value; } else { scheduledTerminationDate_ = new AdjustableDate2(scheduledTerminationDateNode); } } else { scheduledTerminationDate_ = new AdjustableDate2(scheduledTerminationDateNode); } } 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 dateAdjustmentsNode = xmlNode.SelectSingleNode("dateAdjustments"); if (dateAdjustmentsNode != null) { if (dateAdjustmentsNode.Attributes["href"] != null || dateAdjustmentsNode.Attributes["id"] != null) { if (dateAdjustmentsNode.Attributes["id"] != null) { dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["id"].Value; BusinessDayAdjustments ob = new BusinessDayAdjustments(dateAdjustmentsNode); IDManager.SetID(dateAdjustmentsIDRef_, ob); } else if (dateAdjustmentsNode.Attributes["href"] != null) { dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["href"].Value; } else { dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode); } } else { dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode); } } XmlNode referenceInformationNode = xmlNode.SelectSingleNode("referenceInformation"); if (referenceInformationNode != null) { if (referenceInformationNode.Attributes["href"] != null || referenceInformationNode.Attributes["id"] != null) { if (referenceInformationNode.Attributes["id"] != null) { referenceInformationIDRef_ = referenceInformationNode.Attributes["id"].Value; ReferenceInformation ob = new ReferenceInformation(referenceInformationNode); IDManager.SetID(referenceInformationIDRef_, ob); } else if (referenceInformationNode.Attributes["href"] != null) { referenceInformationIDRef_ = referenceInformationNode.Attributes["href"].Value; } else { referenceInformation_ = new ReferenceInformation(referenceInformationNode); } } else { referenceInformation_ = new ReferenceInformation(referenceInformationNode); } } XmlNode indexReferenceInformationNode = xmlNode.SelectSingleNode("indexReferenceInformation"); if (indexReferenceInformationNode != null) { if (indexReferenceInformationNode.Attributes["href"] != null || indexReferenceInformationNode.Attributes["id"] != null) { if (indexReferenceInformationNode.Attributes["id"] != null) { indexReferenceInformationIDRef_ = indexReferenceInformationNode.Attributes["id"].Value; IndexReferenceInformation ob = new IndexReferenceInformation(indexReferenceInformationNode); IDManager.SetID(indexReferenceInformationIDRef_, ob); } else if (indexReferenceInformationNode.Attributes["href"] != null) { indexReferenceInformationIDRef_ = indexReferenceInformationNode.Attributes["href"].Value; } else { indexReferenceInformation_ = new IndexReferenceInformation(indexReferenceInformationNode); } } else { indexReferenceInformation_ = new IndexReferenceInformation(indexReferenceInformationNode); } } XmlNode basketReferenceInformationNode = xmlNode.SelectSingleNode("basketReferenceInformation"); if (basketReferenceInformationNode != null) { if (basketReferenceInformationNode.Attributes["href"] != null || basketReferenceInformationNode.Attributes["id"] != null) { if (basketReferenceInformationNode.Attributes["id"] != null) { basketReferenceInformationIDRef_ = basketReferenceInformationNode.Attributes["id"].Value; BasketReferenceInformation ob = new BasketReferenceInformation(basketReferenceInformationNode); IDManager.SetID(basketReferenceInformationIDRef_, ob); } else if (basketReferenceInformationNode.Attributes["href"] != null) { basketReferenceInformationIDRef_ = basketReferenceInformationNode.Attributes["href"].Value; } else { basketReferenceInformation_ = new BasketReferenceInformation(basketReferenceInformationNode); } } else { basketReferenceInformation_ = new BasketReferenceInformation(basketReferenceInformationNode); } } XmlNodeList additionalTermNodeList = xmlNode.SelectNodes("additionalTerm"); if (additionalTermNodeList != null) { this.additionalTerm_ = new List <AdditionalTerm>(); foreach (XmlNode item in additionalTermNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { additionalTermIDRef_ = item.Attributes["id"].Value; additionalTerm_.Add(new AdditionalTerm(item)); IDManager.SetID(additionalTermIDRef_, additionalTerm_[additionalTerm_.Count - 1]); } else if (item.Attributes["href"] != null) { additionalTermIDRef_ = item.Attributes["href"].Value; } else { additionalTerm_.Add(new AdditionalTerm(item)); } } else { additionalTerm_.Add(new AdditionalTerm(item)); } } } XmlNode substitutionNode = xmlNode.SelectSingleNode("substitution"); if (substitutionNode != null) { if (substitutionNode.Attributes["href"] != null || substitutionNode.Attributes["id"] != null) { if (substitutionNode.Attributes["id"] != null) { substitutionIDRef_ = substitutionNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(substitutionNode); IDManager.SetID(substitutionIDRef_, ob); } else if (substitutionNode.Attributes["href"] != null) { substitutionIDRef_ = substitutionNode.Attributes["href"].Value; } else { substitution_ = new XsdTypeBoolean(substitutionNode); } } else { substitution_ = new XsdTypeBoolean(substitutionNode); } } XmlNode modifiedEquityDeliveryNode = xmlNode.SelectSingleNode("modifiedEquityDelivery"); if (modifiedEquityDeliveryNode != null) { if (modifiedEquityDeliveryNode.Attributes["href"] != null || modifiedEquityDeliveryNode.Attributes["id"] != null) { if (modifiedEquityDeliveryNode.Attributes["id"] != null) { modifiedEquityDeliveryIDRef_ = modifiedEquityDeliveryNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(modifiedEquityDeliveryNode); IDManager.SetID(modifiedEquityDeliveryIDRef_, ob); } else if (modifiedEquityDeliveryNode.Attributes["href"] != null) { modifiedEquityDeliveryIDRef_ = modifiedEquityDeliveryNode.Attributes["href"].Value; } else { modifiedEquityDelivery_ = new XsdTypeBoolean(modifiedEquityDeliveryNode); } } else { modifiedEquityDelivery_ = new XsdTypeBoolean(modifiedEquityDeliveryNode); } } }
public GeneralTerms(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; AdjustableDate2 ob = AdjustableDate2(); IDManager.SetID(effectiveDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { effectiveDateIDRef = item.Attributes["href"].Name; } else { effectiveDate = new AdjustableDate2(item); } } } XmlNodeList scheduledTerminationDateNodeList = xmlNode.SelectNodes("scheduledTerminationDate"); if (scheduledTerminationDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in scheduledTerminationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { scheduledTerminationDateIDRef = item.Attributes["id"].Name; AdjustableDate2 ob = AdjustableDate2(); IDManager.SetID(scheduledTerminationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { scheduledTerminationDateIDRef = item.Attributes["href"].Name; } else { scheduledTerminationDate = new AdjustableDate2(item); } } } 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 dateAdjustmentsNodeList = xmlNode.SelectNodes("dateAdjustments"); if (dateAdjustmentsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in dateAdjustmentsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dateAdjustmentsIDRef = item.Attributes["id"].Name; BusinessDayAdjustments ob = BusinessDayAdjustments(); IDManager.SetID(dateAdjustmentsIDRef, ob); } else if (item.Attributes.ToString() == "href") { dateAdjustmentsIDRef = item.Attributes["href"].Name; } else { dateAdjustments = new BusinessDayAdjustments(item); } } } XmlNodeList referenceInformationNodeList = xmlNode.SelectNodes("referenceInformation"); if (referenceInformationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in referenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceInformationIDRef = item.Attributes["id"].Name; ReferenceInformation ob = ReferenceInformation(); IDManager.SetID(referenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceInformationIDRef = item.Attributes["href"].Name; } else { referenceInformation = new ReferenceInformation(item); } } } XmlNodeList indexReferenceInformationNodeList = xmlNode.SelectNodes("indexReferenceInformation"); if (indexReferenceInformationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in indexReferenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { indexReferenceInformationIDRef = item.Attributes["id"].Name; IndexReferenceInformation ob = IndexReferenceInformation(); IDManager.SetID(indexReferenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { indexReferenceInformationIDRef = item.Attributes["href"].Name; } else { indexReferenceInformation = new IndexReferenceInformation(item); } } } XmlNodeList basketReferenceInformationNodeList = xmlNode.SelectNodes("basketReferenceInformation"); if (basketReferenceInformationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in basketReferenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { basketReferenceInformationIDRef = item.Attributes["id"].Name; BasketReferenceInformation ob = BasketReferenceInformation(); IDManager.SetID(basketReferenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { basketReferenceInformationIDRef = item.Attributes["href"].Name; } else { basketReferenceInformation = new BasketReferenceInformation(item); } } } XmlNodeList additionalTermNodeList = xmlNode.SelectNodes("additionalTerm"); foreach (XmlNode item in additionalTermNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { additionalTermIDRef = item.Attributes["id"].Name; List <AdditionalTerm> ob = new List <AdditionalTerm>(); ob.Add(new AdditionalTerm(item)); IDManager.SetID(additionalTermIDRef, ob); } else if (item.Attributes.ToString() == "href") { additionalTermIDRef = item.Attributes["href"].Name; } else { additionalTerm.Add(new AdditionalTerm(item)); } } } XmlNodeList substitutionNodeList = xmlNode.SelectNodes("substitution"); if (substitutionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in substitutionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { substitutionIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(substitutionIDRef, ob); } else if (item.Attributes.ToString() == "href") { substitutionIDRef = item.Attributes["href"].Name; } else { substitution = new XsdTypeBoolean(item); } } } XmlNodeList modifiedEquityDeliveryNodeList = xmlNode.SelectNodes("modifiedEquityDelivery"); if (modifiedEquityDeliveryNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in modifiedEquityDeliveryNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { modifiedEquityDeliveryIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(modifiedEquityDeliveryIDRef, ob); } else if (item.Attributes.ToString() == "href") { modifiedEquityDeliveryIDRef = item.Attributes["href"].Name; } else { modifiedEquityDelivery = new XsdTypeBoolean(item); } } } }
public GeneralTerms(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; AdjustableDate2 ob = new AdjustableDate2(effectiveDateNode); IDManager.SetID(effectiveDateIDRef_, ob); } else if (effectiveDateNode.Attributes["href"] != null) { effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value; } else { effectiveDate_ = new AdjustableDate2(effectiveDateNode); } } else { effectiveDate_ = new AdjustableDate2(effectiveDateNode); } } XmlNode scheduledTerminationDateNode = xmlNode.SelectSingleNode("scheduledTerminationDate"); if (scheduledTerminationDateNode != null) { if (scheduledTerminationDateNode.Attributes["href"] != null || scheduledTerminationDateNode.Attributes["id"] != null) { if (scheduledTerminationDateNode.Attributes["id"] != null) { scheduledTerminationDateIDRef_ = scheduledTerminationDateNode.Attributes["id"].Value; AdjustableDate2 ob = new AdjustableDate2(scheduledTerminationDateNode); IDManager.SetID(scheduledTerminationDateIDRef_, ob); } else if (scheduledTerminationDateNode.Attributes["href"] != null) { scheduledTerminationDateIDRef_ = scheduledTerminationDateNode.Attributes["href"].Value; } else { scheduledTerminationDate_ = new AdjustableDate2(scheduledTerminationDateNode); } } else { scheduledTerminationDate_ = new AdjustableDate2(scheduledTerminationDateNode); } } 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 dateAdjustmentsNode = xmlNode.SelectSingleNode("dateAdjustments"); if (dateAdjustmentsNode != null) { if (dateAdjustmentsNode.Attributes["href"] != null || dateAdjustmentsNode.Attributes["id"] != null) { if (dateAdjustmentsNode.Attributes["id"] != null) { dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["id"].Value; BusinessDayAdjustments ob = new BusinessDayAdjustments(dateAdjustmentsNode); IDManager.SetID(dateAdjustmentsIDRef_, ob); } else if (dateAdjustmentsNode.Attributes["href"] != null) { dateAdjustmentsIDRef_ = dateAdjustmentsNode.Attributes["href"].Value; } else { dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode); } } else { dateAdjustments_ = new BusinessDayAdjustments(dateAdjustmentsNode); } } XmlNode referenceInformationNode = xmlNode.SelectSingleNode("referenceInformation"); if (referenceInformationNode != null) { if (referenceInformationNode.Attributes["href"] != null || referenceInformationNode.Attributes["id"] != null) { if (referenceInformationNode.Attributes["id"] != null) { referenceInformationIDRef_ = referenceInformationNode.Attributes["id"].Value; ReferenceInformation ob = new ReferenceInformation(referenceInformationNode); IDManager.SetID(referenceInformationIDRef_, ob); } else if (referenceInformationNode.Attributes["href"] != null) { referenceInformationIDRef_ = referenceInformationNode.Attributes["href"].Value; } else { referenceInformation_ = new ReferenceInformation(referenceInformationNode); } } else { referenceInformation_ = new ReferenceInformation(referenceInformationNode); } } XmlNode indexReferenceInformationNode = xmlNode.SelectSingleNode("indexReferenceInformation"); if (indexReferenceInformationNode != null) { if (indexReferenceInformationNode.Attributes["href"] != null || indexReferenceInformationNode.Attributes["id"] != null) { if (indexReferenceInformationNode.Attributes["id"] != null) { indexReferenceInformationIDRef_ = indexReferenceInformationNode.Attributes["id"].Value; IndexReferenceInformation ob = new IndexReferenceInformation(indexReferenceInformationNode); IDManager.SetID(indexReferenceInformationIDRef_, ob); } else if (indexReferenceInformationNode.Attributes["href"] != null) { indexReferenceInformationIDRef_ = indexReferenceInformationNode.Attributes["href"].Value; } else { indexReferenceInformation_ = new IndexReferenceInformation(indexReferenceInformationNode); } } else { indexReferenceInformation_ = new IndexReferenceInformation(indexReferenceInformationNode); } } XmlNode basketReferenceInformationNode = xmlNode.SelectSingleNode("basketReferenceInformation"); if (basketReferenceInformationNode != null) { if (basketReferenceInformationNode.Attributes["href"] != null || basketReferenceInformationNode.Attributes["id"] != null) { if (basketReferenceInformationNode.Attributes["id"] != null) { basketReferenceInformationIDRef_ = basketReferenceInformationNode.Attributes["id"].Value; BasketReferenceInformation ob = new BasketReferenceInformation(basketReferenceInformationNode); IDManager.SetID(basketReferenceInformationIDRef_, ob); } else if (basketReferenceInformationNode.Attributes["href"] != null) { basketReferenceInformationIDRef_ = basketReferenceInformationNode.Attributes["href"].Value; } else { basketReferenceInformation_ = new BasketReferenceInformation(basketReferenceInformationNode); } } else { basketReferenceInformation_ = new BasketReferenceInformation(basketReferenceInformationNode); } } XmlNodeList additionalTermNodeList = xmlNode.SelectNodes("additionalTerm"); if (additionalTermNodeList != null) { this.additionalTerm_ = new List<AdditionalTerm>(); foreach (XmlNode item in additionalTermNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { additionalTermIDRef_ = item.Attributes["id"].Value; additionalTerm_.Add(new AdditionalTerm(item)); IDManager.SetID(additionalTermIDRef_, additionalTerm_[additionalTerm_.Count - 1 ]); } else if (item.Attributes["href"] != null) { additionalTermIDRef_ = item.Attributes["href"].Value; } else { additionalTerm_.Add(new AdditionalTerm(item)); } } else { additionalTerm_.Add(new AdditionalTerm(item)); } } } XmlNode substitutionNode = xmlNode.SelectSingleNode("substitution"); if (substitutionNode != null) { if (substitutionNode.Attributes["href"] != null || substitutionNode.Attributes["id"] != null) { if (substitutionNode.Attributes["id"] != null) { substitutionIDRef_ = substitutionNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(substitutionNode); IDManager.SetID(substitutionIDRef_, ob); } else if (substitutionNode.Attributes["href"] != null) { substitutionIDRef_ = substitutionNode.Attributes["href"].Value; } else { substitution_ = new XsdTypeBoolean(substitutionNode); } } else { substitution_ = new XsdTypeBoolean(substitutionNode); } } XmlNode modifiedEquityDeliveryNode = xmlNode.SelectSingleNode("modifiedEquityDelivery"); if (modifiedEquityDeliveryNode != null) { if (modifiedEquityDeliveryNode.Attributes["href"] != null || modifiedEquityDeliveryNode.Attributes["id"] != null) { if (modifiedEquityDeliveryNode.Attributes["id"] != null) { modifiedEquityDeliveryIDRef_ = modifiedEquityDeliveryNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(modifiedEquityDeliveryNode); IDManager.SetID(modifiedEquityDeliveryIDRef_, ob); } else if (modifiedEquityDeliveryNode.Attributes["href"] != null) { modifiedEquityDeliveryIDRef_ = modifiedEquityDeliveryNode.Attributes["href"].Value; } else { modifiedEquityDelivery_ = new XsdTypeBoolean(modifiedEquityDeliveryNode); } } else { modifiedEquityDelivery_ = new XsdTypeBoolean(modifiedEquityDeliveryNode); } } }
public GeneralTerms(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; AdjustableDate2 ob = AdjustableDate2(); IDManager.SetID(effectiveDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { effectiveDateIDRef = item.Attributes["href"].Name; } else { effectiveDate = new AdjustableDate2(item); } } } XmlNodeList scheduledTerminationDateNodeList = xmlNode.SelectNodes("scheduledTerminationDate"); if (scheduledTerminationDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in scheduledTerminationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { scheduledTerminationDateIDRef = item.Attributes["id"].Name; AdjustableDate2 ob = AdjustableDate2(); IDManager.SetID(scheduledTerminationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { scheduledTerminationDateIDRef = item.Attributes["href"].Name; } else { scheduledTerminationDate = new AdjustableDate2(item); } } } 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 dateAdjustmentsNodeList = xmlNode.SelectNodes("dateAdjustments"); if (dateAdjustmentsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in dateAdjustmentsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dateAdjustmentsIDRef = item.Attributes["id"].Name; BusinessDayAdjustments ob = BusinessDayAdjustments(); IDManager.SetID(dateAdjustmentsIDRef, ob); } else if (item.Attributes.ToString() == "href") { dateAdjustmentsIDRef = item.Attributes["href"].Name; } else { dateAdjustments = new BusinessDayAdjustments(item); } } } XmlNodeList referenceInformationNodeList = xmlNode.SelectNodes("referenceInformation"); if (referenceInformationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in referenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceInformationIDRef = item.Attributes["id"].Name; ReferenceInformation ob = ReferenceInformation(); IDManager.SetID(referenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceInformationIDRef = item.Attributes["href"].Name; } else { referenceInformation = new ReferenceInformation(item); } } } XmlNodeList indexReferenceInformationNodeList = xmlNode.SelectNodes("indexReferenceInformation"); if (indexReferenceInformationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in indexReferenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { indexReferenceInformationIDRef = item.Attributes["id"].Name; IndexReferenceInformation ob = IndexReferenceInformation(); IDManager.SetID(indexReferenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { indexReferenceInformationIDRef = item.Attributes["href"].Name; } else { indexReferenceInformation = new IndexReferenceInformation(item); } } } XmlNodeList basketReferenceInformationNodeList = xmlNode.SelectNodes("basketReferenceInformation"); if (basketReferenceInformationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in basketReferenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { basketReferenceInformationIDRef = item.Attributes["id"].Name; BasketReferenceInformation ob = BasketReferenceInformation(); IDManager.SetID(basketReferenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { basketReferenceInformationIDRef = item.Attributes["href"].Name; } else { basketReferenceInformation = new BasketReferenceInformation(item); } } } XmlNodeList additionalTermNodeList = xmlNode.SelectNodes("additionalTerm"); foreach (XmlNode item in additionalTermNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { additionalTermIDRef = item.Attributes["id"].Name; List<AdditionalTerm> ob = new List<AdditionalTerm>(); ob.Add(new AdditionalTerm(item)); IDManager.SetID(additionalTermIDRef, ob); } else if (item.Attributes.ToString() == "href") { additionalTermIDRef = item.Attributes["href"].Name; } else { additionalTerm.Add(new AdditionalTerm(item)); } } } XmlNodeList substitutionNodeList = xmlNode.SelectNodes("substitution"); if (substitutionNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in substitutionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { substitutionIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(substitutionIDRef, ob); } else if (item.Attributes.ToString() == "href") { substitutionIDRef = item.Attributes["href"].Name; } else { substitution = new XsdTypeBoolean(item); } } } XmlNodeList modifiedEquityDeliveryNodeList = xmlNode.SelectNodes("modifiedEquityDelivery"); if (modifiedEquityDeliveryNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in modifiedEquityDeliveryNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { modifiedEquityDeliveryIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(modifiedEquityDeliveryIDRef, ob); } else if (item.Attributes.ToString() == "href") { modifiedEquityDeliveryIDRef = item.Attributes["href"].Name; } else { modifiedEquityDelivery = new XsdTypeBoolean(item); } } } }