public RequestTradeReferenceInformationUpdateRetracted(XmlNode xmlNode) : base(xmlNode) { XmlNodeList tradeReferenceInformationNodeList = xmlNode.SelectNodes("tradeReferenceInformation"); if (tradeReferenceInformationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in tradeReferenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeReferenceInformationIDRef = item.Attributes["id"].Name; TradeReferenceInformation ob = TradeReferenceInformation(); IDManager.SetID(tradeReferenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeReferenceInformationIDRef = item.Attributes["href"].Name; } else { tradeReferenceInformation = new TradeReferenceInformation(item); } } } XmlNodeList partyNodeList = xmlNode.SelectNodes("party"); foreach (XmlNode item in partyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { partyIDRef = item.Attributes["id"].Name; List<Party> ob = new List<Party>(); ob.Add(new Party(item)); IDManager.SetID(partyIDRef, ob); } else if (item.Attributes.ToString() == "href") { partyIDRef = item.Attributes["href"].Name; } else { party.Add(new Party(item)); } } } XmlNodeList accountNodeList = xmlNode.SelectNodes("account"); foreach (XmlNode item in accountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { accountIDRef = item.Attributes["id"].Name; List<Account> ob = new List<Account>(); ob.Add(new Account(item)); IDManager.SetID(accountIDRef, ob); } else if (item.Attributes.ToString() == "href") { accountIDRef = item.Attributes["href"].Name; } else { account.Add(new Account(item)); } } } }
public TradeWrapper(XmlNode xmlNode) { XmlNode originatingEventNode = xmlNode.SelectSingleNode("originatingEvent"); if (originatingEventNode != null) { if (originatingEventNode.Attributes["href"] != null || originatingEventNode.Attributes["id"] != null) { if (originatingEventNode.Attributes["id"] != null) { originatingEventIDRef_ = originatingEventNode.Attributes["id"].Value; OriginatingEvent ob = new OriginatingEvent(originatingEventNode); IDManager.SetID(originatingEventIDRef_, ob); } else if (originatingEventNode.Attributes["href"] != null) { originatingEventIDRef_ = originatingEventNode.Attributes["href"].Value; } else { originatingEvent_ = new OriginatingEvent(originatingEventNode); } } else { originatingEvent_ = new OriginatingEvent(originatingEventNode); } } XmlNode tradeNode = xmlNode.SelectSingleNode("trade"); if (tradeNode != null) { if (tradeNode.Attributes["href"] != null || tradeNode.Attributes["id"] != null) { if (tradeNode.Attributes["id"] != null) { tradeIDRef_ = tradeNode.Attributes["id"].Value; Trade ob = new Trade(tradeNode); IDManager.SetID(tradeIDRef_, ob); } else if (tradeNode.Attributes["href"] != null) { tradeIDRef_ = tradeNode.Attributes["href"].Value; } else { trade_ = new Trade(tradeNode); } } else { trade_ = new Trade(tradeNode); } } XmlNode tradeReferenceInformationNode = xmlNode.SelectSingleNode("tradeReferenceInformation"); if (tradeReferenceInformationNode != null) { if (tradeReferenceInformationNode.Attributes["href"] != null || tradeReferenceInformationNode.Attributes["id"] != null) { if (tradeReferenceInformationNode.Attributes["id"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["id"].Value; TradeReferenceInformation ob = new TradeReferenceInformation(tradeReferenceInformationNode); IDManager.SetID(tradeReferenceInformationIDRef_, ob); } else if (tradeReferenceInformationNode.Attributes["href"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["href"].Value; } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } }
public ConsentGranted(XmlNode xmlNode) : base(xmlNode) { XmlNode portfolioReferenceNode = xmlNode.SelectSingleNode("portfolioReference"); if (portfolioReferenceNode != null) { if (portfolioReferenceNode.Attributes["href"] != null || portfolioReferenceNode.Attributes["id"] != null) { if (portfolioReferenceNode.Attributes["id"] != null) { portfolioReferenceIDRef_ = portfolioReferenceNode.Attributes["id"].Value; PortfolioReferenceBase ob = new PortfolioReferenceBase(portfolioReferenceNode); IDManager.SetID(portfolioReferenceIDRef_, ob); } else if (portfolioReferenceNode.Attributes["href"] != null) { portfolioReferenceIDRef_ = portfolioReferenceNode.Attributes["href"].Value; } else { portfolioReference_ = new PortfolioReferenceBase(portfolioReferenceNode); } } else { portfolioReference_ = new PortfolioReferenceBase(portfolioReferenceNode); } } XmlNode originatingEventNode = xmlNode.SelectSingleNode("originatingEvent"); if (originatingEventNode != null) { if (originatingEventNode.Attributes["href"] != null || originatingEventNode.Attributes["id"] != null) { if (originatingEventNode.Attributes["id"] != null) { originatingEventIDRef_ = originatingEventNode.Attributes["id"].Value; OriginatingEvent ob = new OriginatingEvent(originatingEventNode); IDManager.SetID(originatingEventIDRef_, ob); } else if (originatingEventNode.Attributes["href"] != null) { originatingEventIDRef_ = originatingEventNode.Attributes["href"].Value; } else { originatingEvent_ = new OriginatingEvent(originatingEventNode); } } else { originatingEvent_ = new OriginatingEvent(originatingEventNode); } } XmlNode tradeNode = xmlNode.SelectSingleNode("trade"); if (tradeNode != null) { if (tradeNode.Attributes["href"] != null || tradeNode.Attributes["id"] != null) { if (tradeNode.Attributes["id"] != null) { tradeIDRef_ = tradeNode.Attributes["id"].Value; Trade ob = new Trade(tradeNode); IDManager.SetID(tradeIDRef_, ob); } else if (tradeNode.Attributes["href"] != null) { tradeIDRef_ = tradeNode.Attributes["href"].Value; } else { trade_ = new Trade(tradeNode); } } else { trade_ = new Trade(tradeNode); } } XmlNode amendmentNode = xmlNode.SelectSingleNode("amendment"); if (amendmentNode != null) { if (amendmentNode.Attributes["href"] != null || amendmentNode.Attributes["id"] != null) { if (amendmentNode.Attributes["id"] != null) { amendmentIDRef_ = amendmentNode.Attributes["id"].Value; TradeAmendmentContent ob = new TradeAmendmentContent(amendmentNode); IDManager.SetID(amendmentIDRef_, ob); } else if (amendmentNode.Attributes["href"] != null) { amendmentIDRef_ = amendmentNode.Attributes["href"].Value; } else { amendment_ = new TradeAmendmentContent(amendmentNode); } } else { amendment_ = new TradeAmendmentContent(amendmentNode); } } XmlNode increaseNode = xmlNode.SelectSingleNode("increase"); if (increaseNode != null) { if (increaseNode.Attributes["href"] != null || increaseNode.Attributes["id"] != null) { if (increaseNode.Attributes["id"] != null) { increaseIDRef_ = increaseNode.Attributes["id"].Value; TradeNotionalChange ob = new TradeNotionalChange(increaseNode); IDManager.SetID(increaseIDRef_, ob); } else if (increaseNode.Attributes["href"] != null) { increaseIDRef_ = increaseNode.Attributes["href"].Value; } else { increase_ = new TradeNotionalChange(increaseNode); } } else { increase_ = new TradeNotionalChange(increaseNode); } } XmlNode terminatingEventNode = xmlNode.SelectSingleNode("terminatingEvent"); if (terminatingEventNode != null) { if (terminatingEventNode.Attributes["href"] != null || terminatingEventNode.Attributes["id"] != null) { if (terminatingEventNode.Attributes["id"] != null) { terminatingEventIDRef_ = terminatingEventNode.Attributes["id"].Value; TerminatingEvent ob = new TerminatingEvent(terminatingEventNode); IDManager.SetID(terminatingEventIDRef_, ob); } else if (terminatingEventNode.Attributes["href"] != null) { terminatingEventIDRef_ = terminatingEventNode.Attributes["href"].Value; } else { terminatingEvent_ = new TerminatingEvent(terminatingEventNode); } } else { terminatingEvent_ = new TerminatingEvent(terminatingEventNode); } } XmlNode terminationNode = xmlNode.SelectSingleNode("termination"); if (terminationNode != null) { if (terminationNode.Attributes["href"] != null || terminationNode.Attributes["id"] != null) { if (terminationNode.Attributes["id"] != null) { terminationIDRef_ = terminationNode.Attributes["id"].Value; TradeNotionalChange ob = new TradeNotionalChange(terminationNode); IDManager.SetID(terminationIDRef_, ob); } else if (terminationNode.Attributes["href"] != null) { terminationIDRef_ = terminationNode.Attributes["href"].Value; } else { termination_ = new TradeNotionalChange(terminationNode); } } else { termination_ = new TradeNotionalChange(terminationNode); } } XmlNode novationNode = xmlNode.SelectSingleNode("novation"); if (novationNode != null) { if (novationNode.Attributes["href"] != null || novationNode.Attributes["id"] != null) { if (novationNode.Attributes["id"] != null) { novationIDRef_ = novationNode.Attributes["id"].Value; TradeNovationContent ob = new TradeNovationContent(novationNode); IDManager.SetID(novationIDRef_, ob); } else if (novationNode.Attributes["href"] != null) { novationIDRef_ = novationNode.Attributes["href"].Value; } else { novation_ = new TradeNovationContent(novationNode); } } else { novation_ = new TradeNovationContent(novationNode); } } XmlNode optionExerciseNode = xmlNode.SelectSingleNode("optionExercise"); if (optionExerciseNode != null) { if (optionExerciseNode.Attributes["href"] != null || optionExerciseNode.Attributes["id"] != null) { if (optionExerciseNode.Attributes["id"] != null) { optionExerciseIDRef_ = optionExerciseNode.Attributes["id"].Value; OptionExercise ob = new OptionExercise(optionExerciseNode); IDManager.SetID(optionExerciseIDRef_, ob); } else if (optionExerciseNode.Attributes["href"] != null) { optionExerciseIDRef_ = optionExerciseNode.Attributes["href"].Value; } else { optionExercise_ = new OptionExercise(optionExerciseNode); } } else { optionExercise_ = new OptionExercise(optionExerciseNode); } } XmlNodeList optionExpiryNodeList = xmlNode.SelectNodes("optionExpiry"); if (optionExpiryNodeList != null) { this.optionExpiry_ = new List<OptionExpiry>(); foreach (XmlNode item in optionExpiryNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { optionExpiryIDRef_ = item.Attributes["id"].Value; optionExpiry_.Add(new OptionExpiry(item)); IDManager.SetID(optionExpiryIDRef_, optionExpiry_[optionExpiry_.Count - 1 ]); } else if (item.Attributes["href"] != null) { optionExpiryIDRef_ = item.Attributes["href"].Value; } else { optionExpiry_.Add(new OptionExpiry(item)); } } else { optionExpiry_.Add(new OptionExpiry(item)); } } } XmlNode deClearNode = xmlNode.SelectSingleNode("deClear"); if (deClearNode != null) { if (deClearNode.Attributes["href"] != null || deClearNode.Attributes["id"] != null) { if (deClearNode.Attributes["id"] != null) { deClearIDRef_ = deClearNode.Attributes["id"].Value; DeClear ob = new DeClear(deClearNode); IDManager.SetID(deClearIDRef_, ob); } else if (deClearNode.Attributes["href"] != null) { deClearIDRef_ = deClearNode.Attributes["href"].Value; } else { deClear_ = new DeClear(deClearNode); } } else { deClear_ = new DeClear(deClearNode); } } XmlNode withdrawalNode = xmlNode.SelectSingleNode("withdrawal"); if (withdrawalNode != null) { if (withdrawalNode.Attributes["href"] != null || withdrawalNode.Attributes["id"] != null) { if (withdrawalNode.Attributes["id"] != null) { withdrawalIDRef_ = withdrawalNode.Attributes["id"].Value; Withdrawal ob = new Withdrawal(withdrawalNode); IDManager.SetID(withdrawalIDRef_, ob); } else if (withdrawalNode.Attributes["href"] != null) { withdrawalIDRef_ = withdrawalNode.Attributes["href"].Value; } else { withdrawal_ = new Withdrawal(withdrawalNode); } } else { withdrawal_ = new Withdrawal(withdrawalNode); } } XmlNode additionalEventNode = xmlNode.SelectSingleNode("additionalEvent"); if (additionalEventNode != null) { if (additionalEventNode.Attributes["href"] != null || additionalEventNode.Attributes["id"] != null) { if (additionalEventNode.Attributes["id"] != null) { additionalEventIDRef_ = additionalEventNode.Attributes["id"].Value; AdditionalEvent ob = new AdditionalEvent(additionalEventNode); IDManager.SetID(additionalEventIDRef_, ob); } else if (additionalEventNode.Attributes["href"] != null) { additionalEventIDRef_ = additionalEventNode.Attributes["href"].Value; } else { additionalEvent_ = new AdditionalEvent(additionalEventNode); } } else { additionalEvent_ = new AdditionalEvent(additionalEventNode); } } XmlNode tradeReferenceInformationNode = xmlNode.SelectSingleNode("tradeReferenceInformation"); if (tradeReferenceInformationNode != null) { if (tradeReferenceInformationNode.Attributes["href"] != null || tradeReferenceInformationNode.Attributes["id"] != null) { if (tradeReferenceInformationNode.Attributes["id"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["id"].Value; TradeReferenceInformation ob = new TradeReferenceInformation(tradeReferenceInformationNode); IDManager.SetID(tradeReferenceInformationIDRef_, ob); } else if (tradeReferenceInformationNode.Attributes["href"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["href"].Value; } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } XmlNodeList partyNodeList = xmlNode.SelectNodes("party"); if (partyNodeList != null) { this.party_ = new List<Party>(); foreach (XmlNode item in partyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { partyIDRef_ = item.Attributes["id"].Value; party_.Add(new Party(item)); IDManager.SetID(partyIDRef_, party_[party_.Count - 1 ]); } else if (item.Attributes["href"] != null) { partyIDRef_ = item.Attributes["href"].Value; } else { party_.Add(new Party(item)); } } else { party_.Add(new Party(item)); } } } XmlNodeList accountNodeList = xmlNode.SelectNodes("account"); if (accountNodeList != null) { this.account_ = new List<Account>(); foreach (XmlNode item in accountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { accountIDRef_ = item.Attributes["id"].Value; account_.Add(new Account(item)); IDManager.SetID(accountIDRef_, account_[account_.Count - 1 ]); } else if (item.Attributes["href"] != null) { accountIDRef_ = item.Attributes["href"].Value; } else { account_.Add(new Account(item)); } } else { account_.Add(new Account(item)); } } } }
public TradeWrapper(XmlNode xmlNode) { XmlNodeList originatingEventNodeList = xmlNode.SelectNodes("originatingEvent"); if (originatingEventNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in originatingEventNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { originatingEventIDRef = item.Attributes["id"].Name; OriginatingEvent ob = OriginatingEvent(); IDManager.SetID(originatingEventIDRef, ob); } else if (item.Attributes.ToString() == "href") { originatingEventIDRef = item.Attributes["href"].Name; } else { originatingEvent = new OriginatingEvent(item); } } } XmlNodeList tradeNodeList = xmlNode.SelectNodes("trade"); if (tradeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in tradeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeIDRef = item.Attributes["id"].Name; Trade ob = Trade(); IDManager.SetID(tradeIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeIDRef = item.Attributes["href"].Name; } else { trade = new Trade(item); } } } XmlNodeList tradeReferenceInformationNodeList = xmlNode.SelectNodes("tradeReferenceInformation"); if (tradeReferenceInformationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in tradeReferenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeReferenceInformationIDRef = item.Attributes["id"].Name; TradeReferenceInformation ob = TradeReferenceInformation(); IDManager.SetID(tradeReferenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeReferenceInformationIDRef = item.Attributes["href"].Name; } else { tradeReferenceInformation = new TradeReferenceInformation(item); } } } }
public RequestTradeReferenceInformationUpdateRetracted(XmlNode xmlNode) : base(xmlNode) { XmlNode tradeReferenceInformationNode = xmlNode.SelectSingleNode("tradeReferenceInformation"); if (tradeReferenceInformationNode != null) { if (tradeReferenceInformationNode.Attributes["href"] != null || tradeReferenceInformationNode.Attributes["id"] != null) { if (tradeReferenceInformationNode.Attributes["id"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["id"].Value; TradeReferenceInformation ob = new TradeReferenceInformation(tradeReferenceInformationNode); IDManager.SetID(tradeReferenceInformationIDRef_, ob); } else if (tradeReferenceInformationNode.Attributes["href"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["href"].Value; } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } XmlNodeList partyNodeList = xmlNode.SelectNodes("party"); if (partyNodeList != null) { this.party_ = new List<Party>(); foreach (XmlNode item in partyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { partyIDRef_ = item.Attributes["id"].Value; party_.Add(new Party(item)); IDManager.SetID(partyIDRef_, party_[party_.Count - 1 ]); } else if (item.Attributes["href"] != null) { partyIDRef_ = item.Attributes["href"].Value; } else { party_.Add(new Party(item)); } } else { party_.Add(new Party(item)); } } } XmlNodeList accountNodeList = xmlNode.SelectNodes("account"); if (accountNodeList != null) { this.account_ = new List<Account>(); foreach (XmlNode item in accountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { accountIDRef_ = item.Attributes["id"].Value; account_.Add(new Account(item)); IDManager.SetID(accountIDRef_, account_[account_.Count - 1 ]); } else if (item.Attributes["href"] != null) { accountIDRef_ = item.Attributes["href"].Value; } else { account_.Add(new Account(item)); } } else { account_.Add(new Account(item)); } } } }
public TradeWrapper(XmlNode xmlNode) { XmlNodeList originatingEventNodeList = xmlNode.SelectNodes("originatingEvent"); if (originatingEventNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in originatingEventNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { originatingEventIDRef = item.Attributes["id"].Name; OriginatingEvent ob = OriginatingEvent(); IDManager.SetID(originatingEventIDRef, ob); } else if (item.Attributes.ToString() == "href") { originatingEventIDRef = item.Attributes["href"].Name; } else { originatingEvent = new OriginatingEvent(item); } } } XmlNodeList tradeNodeList = xmlNode.SelectNodes("trade"); if (tradeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in tradeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeIDRef = item.Attributes["id"].Name; Trade ob = Trade(); IDManager.SetID(tradeIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeIDRef = item.Attributes["href"].Name; } else { trade = new Trade(item); } } } XmlNodeList tradeReferenceInformationNodeList = xmlNode.SelectNodes("tradeReferenceInformation"); if (tradeReferenceInformationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in tradeReferenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeReferenceInformationIDRef = item.Attributes["id"].Name; TradeReferenceInformation ob = TradeReferenceInformation(); IDManager.SetID(tradeReferenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeReferenceInformationIDRef = item.Attributes["href"].Name; } else { tradeReferenceInformation = new TradeReferenceInformation(item); } } } }
public ClearingStatusItem(XmlNode xmlNode) { XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier"); foreach (XmlNode item in tradeIdentifierNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeIdentifierIDRef = item.Attributes["id"].Name; List<TradeIdentifier> ob = new List<TradeIdentifier>(); ob.Add(new TradeIdentifier(item)); IDManager.SetID(tradeIdentifierIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeIdentifierIDRef = item.Attributes["href"].Name; } else { tradeIdentifier.Add(new TradeIdentifier(item)); } } } XmlNodeList tradeReferenceInformationNodeList = xmlNode.SelectNodes("tradeReferenceInformation"); if (tradeReferenceInformationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in tradeReferenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeReferenceInformationIDRef = item.Attributes["id"].Name; TradeReferenceInformation ob = TradeReferenceInformation(); IDManager.SetID(tradeReferenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeReferenceInformationIDRef = item.Attributes["href"].Name; } else { tradeReferenceInformation = new TradeReferenceInformation(item); } } } XmlNodeList tradeNodeList = xmlNode.SelectNodes("trade"); if (tradeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in tradeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeIDRef = item.Attributes["id"].Name; Trade ob = Trade(); IDManager.SetID(tradeIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeIDRef = item.Attributes["href"].Name; } else { trade = new Trade(item); } } } XmlNodeList clearingStatusValueNodeList = xmlNode.SelectNodes("clearingStatusValue"); if (clearingStatusValueNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in clearingStatusValueNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { clearingStatusValueIDRef = item.Attributes["id"].Name; ClearingStatusValue ob = ClearingStatusValue(); IDManager.SetID(clearingStatusValueIDRef, ob); } else if (item.Attributes.ToString() == "href") { clearingStatusValueIDRef = item.Attributes["href"].Name; } else { clearingStatusValue = new ClearingStatusValue(item); } } } XmlNodeList updatedDateTimeNodeList = xmlNode.SelectNodes("updatedDateTime"); if (updatedDateTimeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in updatedDateTimeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { updatedDateTimeIDRef = item.Attributes["id"].Name; XsdTypeDateTime ob = XsdTypeDateTime(); IDManager.SetID(updatedDateTimeIDRef, ob); } else if (item.Attributes.ToString() == "href") { updatedDateTimeIDRef = item.Attributes["href"].Name; } else { updatedDateTime = new XsdTypeDateTime(item); } } } XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason"); foreach (XmlNode item in reasonNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { reasonIDRef = item.Attributes["id"].Name; List<Reason> ob = new List<Reason>(); ob.Add(new Reason(item)); IDManager.SetID(reasonIDRef, ob); } else if (item.Attributes.ToString() == "href") { reasonIDRef = item.Attributes["href"].Name; } else { reason.Add(new Reason(item)); } } } XmlNodeList statusAppliesToNodeList = xmlNode.SelectNodes("statusAppliesTo"); foreach (XmlNode item in statusAppliesToNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { statusAppliesToIDRef = item.Attributes["id"].Name; List<PartyReference> ob = new List<PartyReference>(); ob.Add(new PartyReference(item)); IDManager.SetID(statusAppliesToIDRef, ob); } else if (item.Attributes.ToString() == "href") { statusAppliesToIDRef = item.Attributes["href"].Name; } else { statusAppliesTo.Add(new PartyReference(item)); } } } }
public ClearingStatusItem(XmlNode xmlNode) { XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier"); if (tradeIdentifierNodeList != null) { this.tradeIdentifier_ = new List <TradeIdentifier>(); foreach (XmlNode item in tradeIdentifierNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { tradeIdentifierIDRef_ = item.Attributes["id"].Value; tradeIdentifier_.Add(new TradeIdentifier(item)); IDManager.SetID(tradeIdentifierIDRef_, tradeIdentifier_[tradeIdentifier_.Count - 1]); } else if (item.Attributes["href"] != null) { tradeIdentifierIDRef_ = item.Attributes["href"].Value; } else { tradeIdentifier_.Add(new TradeIdentifier(item)); } } else { tradeIdentifier_.Add(new TradeIdentifier(item)); } } } XmlNode tradeReferenceInformationNode = xmlNode.SelectSingleNode("tradeReferenceInformation"); if (tradeReferenceInformationNode != null) { if (tradeReferenceInformationNode.Attributes["href"] != null || tradeReferenceInformationNode.Attributes["id"] != null) { if (tradeReferenceInformationNode.Attributes["id"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["id"].Value; TradeReferenceInformation ob = new TradeReferenceInformation(tradeReferenceInformationNode); IDManager.SetID(tradeReferenceInformationIDRef_, ob); } else if (tradeReferenceInformationNode.Attributes["href"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["href"].Value; } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } XmlNode tradeNode = xmlNode.SelectSingleNode("trade"); if (tradeNode != null) { if (tradeNode.Attributes["href"] != null || tradeNode.Attributes["id"] != null) { if (tradeNode.Attributes["id"] != null) { tradeIDRef_ = tradeNode.Attributes["id"].Value; Trade ob = new Trade(tradeNode); IDManager.SetID(tradeIDRef_, ob); } else if (tradeNode.Attributes["href"] != null) { tradeIDRef_ = tradeNode.Attributes["href"].Value; } else { trade_ = new Trade(tradeNode); } } else { trade_ = new Trade(tradeNode); } } XmlNode clearingStatusValueNode = xmlNode.SelectSingleNode("clearingStatusValue"); if (clearingStatusValueNode != null) { if (clearingStatusValueNode.Attributes["href"] != null || clearingStatusValueNode.Attributes["id"] != null) { if (clearingStatusValueNode.Attributes["id"] != null) { clearingStatusValueIDRef_ = clearingStatusValueNode.Attributes["id"].Value; ClearingStatusValue ob = new ClearingStatusValue(clearingStatusValueNode); IDManager.SetID(clearingStatusValueIDRef_, ob); } else if (clearingStatusValueNode.Attributes["href"] != null) { clearingStatusValueIDRef_ = clearingStatusValueNode.Attributes["href"].Value; } else { clearingStatusValue_ = new ClearingStatusValue(clearingStatusValueNode); } } else { clearingStatusValue_ = new ClearingStatusValue(clearingStatusValueNode); } } XmlNode updatedDateTimeNode = xmlNode.SelectSingleNode("updatedDateTime"); if (updatedDateTimeNode != null) { if (updatedDateTimeNode.Attributes["href"] != null || updatedDateTimeNode.Attributes["id"] != null) { if (updatedDateTimeNode.Attributes["id"] != null) { updatedDateTimeIDRef_ = updatedDateTimeNode.Attributes["id"].Value; XsdTypeDateTime ob = new XsdTypeDateTime(updatedDateTimeNode); IDManager.SetID(updatedDateTimeIDRef_, ob); } else if (updatedDateTimeNode.Attributes["href"] != null) { updatedDateTimeIDRef_ = updatedDateTimeNode.Attributes["href"].Value; } else { updatedDateTime_ = new XsdTypeDateTime(updatedDateTimeNode); } } else { updatedDateTime_ = new XsdTypeDateTime(updatedDateTimeNode); } } XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason"); if (reasonNodeList != null) { this.reason_ = new List <Reason>(); foreach (XmlNode item in reasonNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { reasonIDRef_ = item.Attributes["id"].Value; reason_.Add(new Reason(item)); IDManager.SetID(reasonIDRef_, reason_[reason_.Count - 1]); } else if (item.Attributes["href"] != null) { reasonIDRef_ = item.Attributes["href"].Value; } else { reason_.Add(new Reason(item)); } } else { reason_.Add(new Reason(item)); } } } XmlNodeList statusAppliesToNodeList = xmlNode.SelectNodes("statusAppliesTo"); if (statusAppliesToNodeList != null) { this.statusAppliesTo_ = new List <PartyReference>(); foreach (XmlNode item in statusAppliesToNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { statusAppliesToIDRef_ = item.Attributes["id"].Value; statusAppliesTo_.Add(new PartyReference(item)); IDManager.SetID(statusAppliesToIDRef_, statusAppliesTo_[statusAppliesTo_.Count - 1]); } else if (item.Attributes["href"] != null) { statusAppliesToIDRef_ = item.Attributes["href"].Value; } else { statusAppliesTo_.Add(new PartyReference(item)); } } else { statusAppliesTo_.Add(new PartyReference(item)); } } } }
public EventRequestAcknowledgement(XmlNode xmlNode) : base(xmlNode) { XmlNode originalMessageNode = xmlNode.SelectSingleNode("originalMessage"); if (originalMessageNode != null) { if (originalMessageNode.Attributes["href"] != null || originalMessageNode.Attributes["id"] != null) { if (originalMessageNode.Attributes["id"] != null) { originalMessageIDRef_ = originalMessageNode.Attributes["id"].Value; UnprocessedElementWrapper ob = new UnprocessedElementWrapper(originalMessageNode); IDManager.SetID(originalMessageIDRef_, ob); } else if (originalMessageNode.Attributes["href"] != null) { originalMessageIDRef_ = originalMessageNode.Attributes["href"].Value; } else { originalMessage_ = new UnprocessedElementWrapper(originalMessageNode); } } else { originalMessage_ = new UnprocessedElementWrapper(originalMessageNode); } } XmlNode tradeReferenceInformationNode = xmlNode.SelectSingleNode("tradeReferenceInformation"); if (tradeReferenceInformationNode != null) { if (tradeReferenceInformationNode.Attributes["href"] != null || tradeReferenceInformationNode.Attributes["id"] != null) { if (tradeReferenceInformationNode.Attributes["id"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["id"].Value; TradeReferenceInformation ob = new TradeReferenceInformation(tradeReferenceInformationNode); IDManager.SetID(tradeReferenceInformationIDRef_, ob); } else if (tradeReferenceInformationNode.Attributes["href"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["href"].Value; } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } XmlNodeList partyNodeList = xmlNode.SelectNodes("party"); if (partyNodeList != null) { this.party_ = new List <Party>(); foreach (XmlNode item in partyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { partyIDRef_ = item.Attributes["id"].Value; party_.Add(new Party(item)); IDManager.SetID(partyIDRef_, party_[party_.Count - 1]); } else if (item.Attributes["href"] != null) { partyIDRef_ = item.Attributes["href"].Value; } else { party_.Add(new Party(item)); } } else { party_.Add(new Party(item)); } } } XmlNodeList accountNodeList = xmlNode.SelectNodes("account"); if (accountNodeList != null) { this.account_ = new List <Account>(); foreach (XmlNode item in accountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { accountIDRef_ = item.Attributes["id"].Value; account_.Add(new Account(item)); IDManager.SetID(accountIDRef_, account_[account_.Count - 1]); } else if (item.Attributes["href"] != null) { accountIDRef_ = item.Attributes["href"].Value; } else { account_.Add(new Account(item)); } } else { account_.Add(new Account(item)); } } } }
public ConsentRefused(XmlNode xmlNode) : base(xmlNode) { XmlNodeList originatingEventNodeList = xmlNode.SelectNodes("originatingEvent"); if (originatingEventNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in originatingEventNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { originatingEventIDRef = item.Attributes["id"].Name; OriginatingEvent ob = OriginatingEvent(); IDManager.SetID(originatingEventIDRef, ob); } else if (item.Attributes.ToString() == "href") { originatingEventIDRef = item.Attributes["href"].Name; } else { originatingEvent = new OriginatingEvent(item); } } } XmlNodeList tradeNodeList = xmlNode.SelectNodes("trade"); if (tradeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in tradeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeIDRef = item.Attributes["id"].Name; Trade ob = Trade(); IDManager.SetID(tradeIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeIDRef = item.Attributes["href"].Name; } else { trade = new Trade(item); } } } XmlNodeList amendmentNodeList = xmlNode.SelectNodes("amendment"); if (amendmentNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in amendmentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { amendmentIDRef = item.Attributes["id"].Name; TradeAmendmentContent ob = TradeAmendmentContent(); IDManager.SetID(amendmentIDRef, ob); } else if (item.Attributes.ToString() == "href") { amendmentIDRef = item.Attributes["href"].Name; } else { amendment = new TradeAmendmentContent(item); } } } XmlNodeList increaseNodeList = xmlNode.SelectNodes("increase"); if (increaseNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in increaseNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { increaseIDRef = item.Attributes["id"].Name; TradeNotionalChange ob = TradeNotionalChange(); IDManager.SetID(increaseIDRef, ob); } else if (item.Attributes.ToString() == "href") { increaseIDRef = item.Attributes["href"].Name; } else { increase = new TradeNotionalChange(item); } } } XmlNodeList terminatingEventNodeList = xmlNode.SelectNodes("terminatingEvent"); if (terminatingEventNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in terminatingEventNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { terminatingEventIDRef = item.Attributes["id"].Name; TerminatingEvent ob = TerminatingEvent(); IDManager.SetID(terminatingEventIDRef, ob); } else if (item.Attributes.ToString() == "href") { terminatingEventIDRef = item.Attributes["href"].Name; } else { terminatingEvent = new TerminatingEvent(item); } } } XmlNodeList terminationNodeList = xmlNode.SelectNodes("termination"); if (terminationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in terminationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { terminationIDRef = item.Attributes["id"].Name; TradeNotionalChange ob = TradeNotionalChange(); IDManager.SetID(terminationIDRef, ob); } else if (item.Attributes.ToString() == "href") { terminationIDRef = item.Attributes["href"].Name; } else { termination = new TradeNotionalChange(item); } } } XmlNodeList novationNodeList = xmlNode.SelectNodes("novation"); if (novationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in novationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { novationIDRef = item.Attributes["id"].Name; TradeNovationContent ob = TradeNovationContent(); IDManager.SetID(novationIDRef, ob); } else if (item.Attributes.ToString() == "href") { novationIDRef = item.Attributes["href"].Name; } else { novation = new TradeNovationContent(item); } } } XmlNodeList optionExerciseNodeList = xmlNode.SelectNodes("optionExercise"); if (optionExerciseNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in optionExerciseNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { optionExerciseIDRef = item.Attributes["id"].Name; OptionExercise ob = OptionExercise(); IDManager.SetID(optionExerciseIDRef, ob); } else if (item.Attributes.ToString() == "href") { optionExerciseIDRef = item.Attributes["href"].Name; } else { optionExercise = new OptionExercise(item); } } } XmlNodeList optionExpiryNodeList = xmlNode.SelectNodes("optionExpiry"); foreach (XmlNode item in optionExpiryNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { optionExpiryIDRef = item.Attributes["id"].Name; List <OptionExpiry> ob = new List <OptionExpiry>(); ob.Add(new OptionExpiry(item)); IDManager.SetID(optionExpiryIDRef, ob); } else if (item.Attributes.ToString() == "href") { optionExpiryIDRef = item.Attributes["href"].Name; } else { optionExpiry.Add(new OptionExpiry(item)); } } } XmlNodeList deClearNodeList = xmlNode.SelectNodes("deClear"); if (deClearNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in deClearNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deClearIDRef = item.Attributes["id"].Name; DeClear ob = DeClear(); IDManager.SetID(deClearIDRef, ob); } else if (item.Attributes.ToString() == "href") { deClearIDRef = item.Attributes["href"].Name; } else { deClear = new DeClear(item); } } } XmlNodeList withdrawalNodeList = xmlNode.SelectNodes("withdrawal"); if (withdrawalNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in withdrawalNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { withdrawalIDRef = item.Attributes["id"].Name; Withdrawal ob = Withdrawal(); IDManager.SetID(withdrawalIDRef, ob); } else if (item.Attributes.ToString() == "href") { withdrawalIDRef = item.Attributes["href"].Name; } else { withdrawal = new Withdrawal(item); } } } XmlNodeList additionalEventNodeList = xmlNode.SelectNodes("additionalEvent"); if (additionalEventNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in additionalEventNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { additionalEventIDRef = item.Attributes["id"].Name; AdditionalEvent ob = AdditionalEvent(); IDManager.SetID(additionalEventIDRef, ob); } else if (item.Attributes.ToString() == "href") { additionalEventIDRef = item.Attributes["href"].Name; } else { additionalEvent = new AdditionalEvent(item); } } } XmlNodeList tradeReferenceInformationNodeList = xmlNode.SelectNodes("tradeReferenceInformation"); if (tradeReferenceInformationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in tradeReferenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeReferenceInformationIDRef = item.Attributes["id"].Name; TradeReferenceInformation ob = TradeReferenceInformation(); IDManager.SetID(tradeReferenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeReferenceInformationIDRef = item.Attributes["href"].Name; } else { tradeReferenceInformation = new TradeReferenceInformation(item); } } } XmlNodeList partyNodeList = xmlNode.SelectNodes("party"); foreach (XmlNode item in partyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { partyIDRef = item.Attributes["id"].Name; List <Party> ob = new List <Party>(); ob.Add(new Party(item)); IDManager.SetID(partyIDRef, ob); } else if (item.Attributes.ToString() == "href") { partyIDRef = item.Attributes["href"].Name; } else { party.Add(new Party(item)); } } } XmlNodeList accountNodeList = xmlNode.SelectNodes("account"); foreach (XmlNode item in accountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { accountIDRef = item.Attributes["id"].Name; List <Account> ob = new List <Account>(); ob.Add(new Account(item)); IDManager.SetID(accountIDRef, ob); } else if (item.Attributes.ToString() == "href") { accountIDRef = item.Attributes["href"].Name; } else { account.Add(new Account(item)); } } } XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason"); foreach (XmlNode item in reasonNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { reasonIDRef = item.Attributes["id"].Name; List <Reason> ob = new List <Reason>(); ob.Add(new Reason(item)); IDManager.SetID(reasonIDRef, ob); } else if (item.Attributes.ToString() == "href") { reasonIDRef = item.Attributes["href"].Name; } else { reason.Add(new Reason(item)); } } } }
public EventRequestAcknowledgement(XmlNode xmlNode) : base(xmlNode) { XmlNodeList originalMessageNodeList = xmlNode.SelectNodes("originalMessage"); if (originalMessageNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in originalMessageNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { originalMessageIDRef = item.Attributes["id"].Name; UnprocessedElementWrapper ob = UnprocessedElementWrapper(); IDManager.SetID(originalMessageIDRef, ob); } else if (item.Attributes.ToString() == "href") { originalMessageIDRef = item.Attributes["href"].Name; } else { originalMessage = new UnprocessedElementWrapper(item); } } } XmlNodeList tradeReferenceInformationNodeList = xmlNode.SelectNodes("tradeReferenceInformation"); if (tradeReferenceInformationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in tradeReferenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeReferenceInformationIDRef = item.Attributes["id"].Name; TradeReferenceInformation ob = TradeReferenceInformation(); IDManager.SetID(tradeReferenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeReferenceInformationIDRef = item.Attributes["href"].Name; } else { tradeReferenceInformation = new TradeReferenceInformation(item); } } } XmlNodeList partyNodeList = xmlNode.SelectNodes("party"); foreach (XmlNode item in partyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { partyIDRef = item.Attributes["id"].Name; List<Party> ob = new List<Party>(); ob.Add(new Party(item)); IDManager.SetID(partyIDRef, ob); } else if (item.Attributes.ToString() == "href") { partyIDRef = item.Attributes["href"].Name; } else { party.Add(new Party(item)); } } } XmlNodeList accountNodeList = xmlNode.SelectNodes("account"); foreach (XmlNode item in accountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { accountIDRef = item.Attributes["id"].Name; List<Account> ob = new List<Account>(); ob.Add(new Account(item)); IDManager.SetID(accountIDRef, ob); } else if (item.Attributes.ToString() == "href") { accountIDRef = item.Attributes["href"].Name; } else { account.Add(new Account(item)); } } } }
public ClearingStatusItem(XmlNode xmlNode) { XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier"); if (tradeIdentifierNodeList != null) { this.tradeIdentifier_ = new List<TradeIdentifier>(); foreach (XmlNode item in tradeIdentifierNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { tradeIdentifierIDRef_ = item.Attributes["id"].Value; tradeIdentifier_.Add(new TradeIdentifier(item)); IDManager.SetID(tradeIdentifierIDRef_, tradeIdentifier_[tradeIdentifier_.Count - 1 ]); } else if (item.Attributes["href"] != null) { tradeIdentifierIDRef_ = item.Attributes["href"].Value; } else { tradeIdentifier_.Add(new TradeIdentifier(item)); } } else { tradeIdentifier_.Add(new TradeIdentifier(item)); } } } XmlNode tradeReferenceInformationNode = xmlNode.SelectSingleNode("tradeReferenceInformation"); if (tradeReferenceInformationNode != null) { if (tradeReferenceInformationNode.Attributes["href"] != null || tradeReferenceInformationNode.Attributes["id"] != null) { if (tradeReferenceInformationNode.Attributes["id"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["id"].Value; TradeReferenceInformation ob = new TradeReferenceInformation(tradeReferenceInformationNode); IDManager.SetID(tradeReferenceInformationIDRef_, ob); } else if (tradeReferenceInformationNode.Attributes["href"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["href"].Value; } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } XmlNode tradeNode = xmlNode.SelectSingleNode("trade"); if (tradeNode != null) { if (tradeNode.Attributes["href"] != null || tradeNode.Attributes["id"] != null) { if (tradeNode.Attributes["id"] != null) { tradeIDRef_ = tradeNode.Attributes["id"].Value; Trade ob = new Trade(tradeNode); IDManager.SetID(tradeIDRef_, ob); } else if (tradeNode.Attributes["href"] != null) { tradeIDRef_ = tradeNode.Attributes["href"].Value; } else { trade_ = new Trade(tradeNode); } } else { trade_ = new Trade(tradeNode); } } XmlNode clearingStatusValueNode = xmlNode.SelectSingleNode("clearingStatusValue"); if (clearingStatusValueNode != null) { if (clearingStatusValueNode.Attributes["href"] != null || clearingStatusValueNode.Attributes["id"] != null) { if (clearingStatusValueNode.Attributes["id"] != null) { clearingStatusValueIDRef_ = clearingStatusValueNode.Attributes["id"].Value; ClearingStatusValue ob = new ClearingStatusValue(clearingStatusValueNode); IDManager.SetID(clearingStatusValueIDRef_, ob); } else if (clearingStatusValueNode.Attributes["href"] != null) { clearingStatusValueIDRef_ = clearingStatusValueNode.Attributes["href"].Value; } else { clearingStatusValue_ = new ClearingStatusValue(clearingStatusValueNode); } } else { clearingStatusValue_ = new ClearingStatusValue(clearingStatusValueNode); } } XmlNode updatedDateTimeNode = xmlNode.SelectSingleNode("updatedDateTime"); if (updatedDateTimeNode != null) { if (updatedDateTimeNode.Attributes["href"] != null || updatedDateTimeNode.Attributes["id"] != null) { if (updatedDateTimeNode.Attributes["id"] != null) { updatedDateTimeIDRef_ = updatedDateTimeNode.Attributes["id"].Value; XsdTypeDateTime ob = new XsdTypeDateTime(updatedDateTimeNode); IDManager.SetID(updatedDateTimeIDRef_, ob); } else if (updatedDateTimeNode.Attributes["href"] != null) { updatedDateTimeIDRef_ = updatedDateTimeNode.Attributes["href"].Value; } else { updatedDateTime_ = new XsdTypeDateTime(updatedDateTimeNode); } } else { updatedDateTime_ = new XsdTypeDateTime(updatedDateTimeNode); } } XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason"); if (reasonNodeList != null) { this.reason_ = new List<Reason>(); foreach (XmlNode item in reasonNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { reasonIDRef_ = item.Attributes["id"].Value; reason_.Add(new Reason(item)); IDManager.SetID(reasonIDRef_, reason_[reason_.Count - 1 ]); } else if (item.Attributes["href"] != null) { reasonIDRef_ = item.Attributes["href"].Value; } else { reason_.Add(new Reason(item)); } } else { reason_.Add(new Reason(item)); } } } XmlNodeList statusAppliesToNodeList = xmlNode.SelectNodes("statusAppliesTo"); if (statusAppliesToNodeList != null) { this.statusAppliesTo_ = new List<PartyReference>(); foreach (XmlNode item in statusAppliesToNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { statusAppliesToIDRef_ = item.Attributes["id"].Value; statusAppliesTo_.Add(new PartyReference(item)); IDManager.SetID(statusAppliesToIDRef_, statusAppliesTo_[statusAppliesTo_.Count - 1 ]); } else if (item.Attributes["href"] != null) { statusAppliesToIDRef_ = item.Attributes["href"].Value; } else { statusAppliesTo_.Add(new PartyReference(item)); } } else { statusAppliesTo_.Add(new PartyReference(item)); } } } }
public RequestTradeReferenceInformationUpdateRetracted(XmlNode xmlNode) : base(xmlNode) { XmlNode tradeReferenceInformationNode = xmlNode.SelectSingleNode("tradeReferenceInformation"); if (tradeReferenceInformationNode != null) { if (tradeReferenceInformationNode.Attributes["href"] != null || tradeReferenceInformationNode.Attributes["id"] != null) { if (tradeReferenceInformationNode.Attributes["id"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["id"].Value; TradeReferenceInformation ob = new TradeReferenceInformation(tradeReferenceInformationNode); IDManager.SetID(tradeReferenceInformationIDRef_, ob); } else if (tradeReferenceInformationNode.Attributes["href"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["href"].Value; } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } XmlNodeList partyNodeList = xmlNode.SelectNodes("party"); if (partyNodeList != null) { this.party_ = new List <Party>(); foreach (XmlNode item in partyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { partyIDRef_ = item.Attributes["id"].Value; party_.Add(new Party(item)); IDManager.SetID(partyIDRef_, party_[party_.Count - 1]); } else if (item.Attributes["href"] != null) { partyIDRef_ = item.Attributes["href"].Value; } else { party_.Add(new Party(item)); } } else { party_.Add(new Party(item)); } } } XmlNodeList accountNodeList = xmlNode.SelectNodes("account"); if (accountNodeList != null) { this.account_ = new List <Account>(); foreach (XmlNode item in accountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { accountIDRef_ = item.Attributes["id"].Value; account_.Add(new Account(item)); IDManager.SetID(accountIDRef_, account_[account_.Count - 1]); } else if (item.Attributes["href"] != null) { accountIDRef_ = item.Attributes["href"].Value; } else { account_.Add(new Account(item)); } } else { account_.Add(new Account(item)); } } } }
public ClearingStatusItem(XmlNode xmlNode) { XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier"); foreach (XmlNode item in tradeIdentifierNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeIdentifierIDRef = item.Attributes["id"].Name; List <TradeIdentifier> ob = new List <TradeIdentifier>(); ob.Add(new TradeIdentifier(item)); IDManager.SetID(tradeIdentifierIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeIdentifierIDRef = item.Attributes["href"].Name; } else { tradeIdentifier.Add(new TradeIdentifier(item)); } } } XmlNodeList tradeReferenceInformationNodeList = xmlNode.SelectNodes("tradeReferenceInformation"); if (tradeReferenceInformationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in tradeReferenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeReferenceInformationIDRef = item.Attributes["id"].Name; TradeReferenceInformation ob = TradeReferenceInformation(); IDManager.SetID(tradeReferenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeReferenceInformationIDRef = item.Attributes["href"].Name; } else { tradeReferenceInformation = new TradeReferenceInformation(item); } } } XmlNodeList tradeNodeList = xmlNode.SelectNodes("trade"); if (tradeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in tradeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeIDRef = item.Attributes["id"].Name; Trade ob = Trade(); IDManager.SetID(tradeIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeIDRef = item.Attributes["href"].Name; } else { trade = new Trade(item); } } } XmlNodeList clearingStatusValueNodeList = xmlNode.SelectNodes("clearingStatusValue"); if (clearingStatusValueNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in clearingStatusValueNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { clearingStatusValueIDRef = item.Attributes["id"].Name; ClearingStatusValue ob = ClearingStatusValue(); IDManager.SetID(clearingStatusValueIDRef, ob); } else if (item.Attributes.ToString() == "href") { clearingStatusValueIDRef = item.Attributes["href"].Name; } else { clearingStatusValue = new ClearingStatusValue(item); } } } XmlNodeList updatedDateTimeNodeList = xmlNode.SelectNodes("updatedDateTime"); if (updatedDateTimeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in updatedDateTimeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { updatedDateTimeIDRef = item.Attributes["id"].Name; XsdTypeDateTime ob = XsdTypeDateTime(); IDManager.SetID(updatedDateTimeIDRef, ob); } else if (item.Attributes.ToString() == "href") { updatedDateTimeIDRef = item.Attributes["href"].Name; } else { updatedDateTime = new XsdTypeDateTime(item); } } } XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason"); foreach (XmlNode item in reasonNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { reasonIDRef = item.Attributes["id"].Name; List <Reason> ob = new List <Reason>(); ob.Add(new Reason(item)); IDManager.SetID(reasonIDRef, ob); } else if (item.Attributes.ToString() == "href") { reasonIDRef = item.Attributes["href"].Name; } else { reason.Add(new Reason(item)); } } } XmlNodeList statusAppliesToNodeList = xmlNode.SelectNodes("statusAppliesTo"); foreach (XmlNode item in statusAppliesToNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { statusAppliesToIDRef = item.Attributes["id"].Name; List <PartyReference> ob = new List <PartyReference>(); ob.Add(new PartyReference(item)); IDManager.SetID(statusAppliesToIDRef, ob); } else if (item.Attributes.ToString() == "href") { statusAppliesToIDRef = item.Attributes["href"].Name; } else { statusAppliesTo.Add(new PartyReference(item)); } } } }
public ConsentGranted(XmlNode xmlNode) : base(xmlNode) { XmlNode portfolioReferenceNode = xmlNode.SelectSingleNode("portfolioReference"); if (portfolioReferenceNode != null) { if (portfolioReferenceNode.Attributes["href"] != null || portfolioReferenceNode.Attributes["id"] != null) { if (portfolioReferenceNode.Attributes["id"] != null) { portfolioReferenceIDRef_ = portfolioReferenceNode.Attributes["id"].Value; PortfolioReferenceBase ob = new PortfolioReferenceBase(portfolioReferenceNode); IDManager.SetID(portfolioReferenceIDRef_, ob); } else if (portfolioReferenceNode.Attributes["href"] != null) { portfolioReferenceIDRef_ = portfolioReferenceNode.Attributes["href"].Value; } else { portfolioReference_ = new PortfolioReferenceBase(portfolioReferenceNode); } } else { portfolioReference_ = new PortfolioReferenceBase(portfolioReferenceNode); } } XmlNode originatingEventNode = xmlNode.SelectSingleNode("originatingEvent"); if (originatingEventNode != null) { if (originatingEventNode.Attributes["href"] != null || originatingEventNode.Attributes["id"] != null) { if (originatingEventNode.Attributes["id"] != null) { originatingEventIDRef_ = originatingEventNode.Attributes["id"].Value; OriginatingEvent ob = new OriginatingEvent(originatingEventNode); IDManager.SetID(originatingEventIDRef_, ob); } else if (originatingEventNode.Attributes["href"] != null) { originatingEventIDRef_ = originatingEventNode.Attributes["href"].Value; } else { originatingEvent_ = new OriginatingEvent(originatingEventNode); } } else { originatingEvent_ = new OriginatingEvent(originatingEventNode); } } XmlNode tradeNode = xmlNode.SelectSingleNode("trade"); if (tradeNode != null) { if (tradeNode.Attributes["href"] != null || tradeNode.Attributes["id"] != null) { if (tradeNode.Attributes["id"] != null) { tradeIDRef_ = tradeNode.Attributes["id"].Value; Trade ob = new Trade(tradeNode); IDManager.SetID(tradeIDRef_, ob); } else if (tradeNode.Attributes["href"] != null) { tradeIDRef_ = tradeNode.Attributes["href"].Value; } else { trade_ = new Trade(tradeNode); } } else { trade_ = new Trade(tradeNode); } } XmlNode amendmentNode = xmlNode.SelectSingleNode("amendment"); if (amendmentNode != null) { if (amendmentNode.Attributes["href"] != null || amendmentNode.Attributes["id"] != null) { if (amendmentNode.Attributes["id"] != null) { amendmentIDRef_ = amendmentNode.Attributes["id"].Value; TradeAmendmentContent ob = new TradeAmendmentContent(amendmentNode); IDManager.SetID(amendmentIDRef_, ob); } else if (amendmentNode.Attributes["href"] != null) { amendmentIDRef_ = amendmentNode.Attributes["href"].Value; } else { amendment_ = new TradeAmendmentContent(amendmentNode); } } else { amendment_ = new TradeAmendmentContent(amendmentNode); } } XmlNode increaseNode = xmlNode.SelectSingleNode("increase"); if (increaseNode != null) { if (increaseNode.Attributes["href"] != null || increaseNode.Attributes["id"] != null) { if (increaseNode.Attributes["id"] != null) { increaseIDRef_ = increaseNode.Attributes["id"].Value; TradeNotionalChange ob = new TradeNotionalChange(increaseNode); IDManager.SetID(increaseIDRef_, ob); } else if (increaseNode.Attributes["href"] != null) { increaseIDRef_ = increaseNode.Attributes["href"].Value; } else { increase_ = new TradeNotionalChange(increaseNode); } } else { increase_ = new TradeNotionalChange(increaseNode); } } XmlNode terminatingEventNode = xmlNode.SelectSingleNode("terminatingEvent"); if (terminatingEventNode != null) { if (terminatingEventNode.Attributes["href"] != null || terminatingEventNode.Attributes["id"] != null) { if (terminatingEventNode.Attributes["id"] != null) { terminatingEventIDRef_ = terminatingEventNode.Attributes["id"].Value; TerminatingEvent ob = new TerminatingEvent(terminatingEventNode); IDManager.SetID(terminatingEventIDRef_, ob); } else if (terminatingEventNode.Attributes["href"] != null) { terminatingEventIDRef_ = terminatingEventNode.Attributes["href"].Value; } else { terminatingEvent_ = new TerminatingEvent(terminatingEventNode); } } else { terminatingEvent_ = new TerminatingEvent(terminatingEventNode); } } XmlNode terminationNode = xmlNode.SelectSingleNode("termination"); if (terminationNode != null) { if (terminationNode.Attributes["href"] != null || terminationNode.Attributes["id"] != null) { if (terminationNode.Attributes["id"] != null) { terminationIDRef_ = terminationNode.Attributes["id"].Value; TradeNotionalChange ob = new TradeNotionalChange(terminationNode); IDManager.SetID(terminationIDRef_, ob); } else if (terminationNode.Attributes["href"] != null) { terminationIDRef_ = terminationNode.Attributes["href"].Value; } else { termination_ = new TradeNotionalChange(terminationNode); } } else { termination_ = new TradeNotionalChange(terminationNode); } } XmlNode novationNode = xmlNode.SelectSingleNode("novation"); if (novationNode != null) { if (novationNode.Attributes["href"] != null || novationNode.Attributes["id"] != null) { if (novationNode.Attributes["id"] != null) { novationIDRef_ = novationNode.Attributes["id"].Value; TradeNovationContent ob = new TradeNovationContent(novationNode); IDManager.SetID(novationIDRef_, ob); } else if (novationNode.Attributes["href"] != null) { novationIDRef_ = novationNode.Attributes["href"].Value; } else { novation_ = new TradeNovationContent(novationNode); } } else { novation_ = new TradeNovationContent(novationNode); } } XmlNode optionExerciseNode = xmlNode.SelectSingleNode("optionExercise"); if (optionExerciseNode != null) { if (optionExerciseNode.Attributes["href"] != null || optionExerciseNode.Attributes["id"] != null) { if (optionExerciseNode.Attributes["id"] != null) { optionExerciseIDRef_ = optionExerciseNode.Attributes["id"].Value; OptionExercise ob = new OptionExercise(optionExerciseNode); IDManager.SetID(optionExerciseIDRef_, ob); } else if (optionExerciseNode.Attributes["href"] != null) { optionExerciseIDRef_ = optionExerciseNode.Attributes["href"].Value; } else { optionExercise_ = new OptionExercise(optionExerciseNode); } } else { optionExercise_ = new OptionExercise(optionExerciseNode); } } XmlNodeList optionExpiryNodeList = xmlNode.SelectNodes("optionExpiry"); if (optionExpiryNodeList != null) { this.optionExpiry_ = new List <OptionExpiry>(); foreach (XmlNode item in optionExpiryNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { optionExpiryIDRef_ = item.Attributes["id"].Value; optionExpiry_.Add(new OptionExpiry(item)); IDManager.SetID(optionExpiryIDRef_, optionExpiry_[optionExpiry_.Count - 1]); } else if (item.Attributes["href"] != null) { optionExpiryIDRef_ = item.Attributes["href"].Value; } else { optionExpiry_.Add(new OptionExpiry(item)); } } else { optionExpiry_.Add(new OptionExpiry(item)); } } } XmlNode deClearNode = xmlNode.SelectSingleNode("deClear"); if (deClearNode != null) { if (deClearNode.Attributes["href"] != null || deClearNode.Attributes["id"] != null) { if (deClearNode.Attributes["id"] != null) { deClearIDRef_ = deClearNode.Attributes["id"].Value; DeClear ob = new DeClear(deClearNode); IDManager.SetID(deClearIDRef_, ob); } else if (deClearNode.Attributes["href"] != null) { deClearIDRef_ = deClearNode.Attributes["href"].Value; } else { deClear_ = new DeClear(deClearNode); } } else { deClear_ = new DeClear(deClearNode); } } XmlNode withdrawalNode = xmlNode.SelectSingleNode("withdrawal"); if (withdrawalNode != null) { if (withdrawalNode.Attributes["href"] != null || withdrawalNode.Attributes["id"] != null) { if (withdrawalNode.Attributes["id"] != null) { withdrawalIDRef_ = withdrawalNode.Attributes["id"].Value; Withdrawal ob = new Withdrawal(withdrawalNode); IDManager.SetID(withdrawalIDRef_, ob); } else if (withdrawalNode.Attributes["href"] != null) { withdrawalIDRef_ = withdrawalNode.Attributes["href"].Value; } else { withdrawal_ = new Withdrawal(withdrawalNode); } } else { withdrawal_ = new Withdrawal(withdrawalNode); } } XmlNode additionalEventNode = xmlNode.SelectSingleNode("additionalEvent"); if (additionalEventNode != null) { if (additionalEventNode.Attributes["href"] != null || additionalEventNode.Attributes["id"] != null) { if (additionalEventNode.Attributes["id"] != null) { additionalEventIDRef_ = additionalEventNode.Attributes["id"].Value; AdditionalEvent ob = new AdditionalEvent(additionalEventNode); IDManager.SetID(additionalEventIDRef_, ob); } else if (additionalEventNode.Attributes["href"] != null) { additionalEventIDRef_ = additionalEventNode.Attributes["href"].Value; } else { additionalEvent_ = new AdditionalEvent(additionalEventNode); } } else { additionalEvent_ = new AdditionalEvent(additionalEventNode); } } XmlNode tradeReferenceInformationNode = xmlNode.SelectSingleNode("tradeReferenceInformation"); if (tradeReferenceInformationNode != null) { if (tradeReferenceInformationNode.Attributes["href"] != null || tradeReferenceInformationNode.Attributes["id"] != null) { if (tradeReferenceInformationNode.Attributes["id"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["id"].Value; TradeReferenceInformation ob = new TradeReferenceInformation(tradeReferenceInformationNode); IDManager.SetID(tradeReferenceInformationIDRef_, ob); } else if (tradeReferenceInformationNode.Attributes["href"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["href"].Value; } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } XmlNodeList partyNodeList = xmlNode.SelectNodes("party"); if (partyNodeList != null) { this.party_ = new List <Party>(); foreach (XmlNode item in partyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { partyIDRef_ = item.Attributes["id"].Value; party_.Add(new Party(item)); IDManager.SetID(partyIDRef_, party_[party_.Count - 1]); } else if (item.Attributes["href"] != null) { partyIDRef_ = item.Attributes["href"].Value; } else { party_.Add(new Party(item)); } } else { party_.Add(new Party(item)); } } } XmlNodeList accountNodeList = xmlNode.SelectNodes("account"); if (accountNodeList != null) { this.account_ = new List <Account>(); foreach (XmlNode item in accountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { accountIDRef_ = item.Attributes["id"].Value; account_.Add(new Account(item)); IDManager.SetID(accountIDRef_, account_[account_.Count - 1]); } else if (item.Attributes["href"] != null) { accountIDRef_ = item.Attributes["href"].Value; } else { account_.Add(new Account(item)); } } else { account_.Add(new Account(item)); } } } }
public RequestTradeReferenceInformationUpdateRetracted(XmlNode xmlNode) : base(xmlNode) { XmlNodeList tradeReferenceInformationNodeList = xmlNode.SelectNodes("tradeReferenceInformation"); if (tradeReferenceInformationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in tradeReferenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeReferenceInformationIDRef = item.Attributes["id"].Name; TradeReferenceInformation ob = TradeReferenceInformation(); IDManager.SetID(tradeReferenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeReferenceInformationIDRef = item.Attributes["href"].Name; } else { tradeReferenceInformation = new TradeReferenceInformation(item); } } } XmlNodeList partyNodeList = xmlNode.SelectNodes("party"); foreach (XmlNode item in partyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { partyIDRef = item.Attributes["id"].Name; List <Party> ob = new List <Party>(); ob.Add(new Party(item)); IDManager.SetID(partyIDRef, ob); } else if (item.Attributes.ToString() == "href") { partyIDRef = item.Attributes["href"].Name; } else { party.Add(new Party(item)); } } } XmlNodeList accountNodeList = xmlNode.SelectNodes("account"); foreach (XmlNode item in accountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { accountIDRef = item.Attributes["id"].Name; List <Account> ob = new List <Account>(); ob.Add(new Account(item)); IDManager.SetID(accountIDRef, ob); } else if (item.Attributes.ToString() == "href") { accountIDRef = item.Attributes["href"].Name; } else { account.Add(new Account(item)); } } } }
public EventRequestAcknowledgement(XmlNode xmlNode) : base(xmlNode) { XmlNodeList originalMessageNodeList = xmlNode.SelectNodes("originalMessage"); if (originalMessageNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in originalMessageNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { originalMessageIDRef = item.Attributes["id"].Name; UnprocessedElementWrapper ob = UnprocessedElementWrapper(); IDManager.SetID(originalMessageIDRef, ob); } else if (item.Attributes.ToString() == "href") { originalMessageIDRef = item.Attributes["href"].Name; } else { originalMessage = new UnprocessedElementWrapper(item); } } } XmlNodeList tradeReferenceInformationNodeList = xmlNode.SelectNodes("tradeReferenceInformation"); if (tradeReferenceInformationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in tradeReferenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeReferenceInformationIDRef = item.Attributes["id"].Name; TradeReferenceInformation ob = TradeReferenceInformation(); IDManager.SetID(tradeReferenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeReferenceInformationIDRef = item.Attributes["href"].Name; } else { tradeReferenceInformation = new TradeReferenceInformation(item); } } } XmlNodeList partyNodeList = xmlNode.SelectNodes("party"); foreach (XmlNode item in partyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { partyIDRef = item.Attributes["id"].Name; List <Party> ob = new List <Party>(); ob.Add(new Party(item)); IDManager.SetID(partyIDRef, ob); } else if (item.Attributes.ToString() == "href") { partyIDRef = item.Attributes["href"].Name; } else { party.Add(new Party(item)); } } } XmlNodeList accountNodeList = xmlNode.SelectNodes("account"); foreach (XmlNode item in accountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { accountIDRef = item.Attributes["id"].Name; List <Account> ob = new List <Account>(); ob.Add(new Account(item)); IDManager.SetID(accountIDRef, ob); } else if (item.Attributes.ToString() == "href") { accountIDRef = item.Attributes["href"].Name; } else { account.Add(new Account(item)); } } } }
public ConsentRefused(XmlNode xmlNode) : base(xmlNode) { XmlNodeList originatingEventNodeList = xmlNode.SelectNodes("originatingEvent"); if (originatingEventNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in originatingEventNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { originatingEventIDRef = item.Attributes["id"].Name; OriginatingEvent ob = OriginatingEvent(); IDManager.SetID(originatingEventIDRef, ob); } else if (item.Attributes.ToString() == "href") { originatingEventIDRef = item.Attributes["href"].Name; } else { originatingEvent = new OriginatingEvent(item); } } } XmlNodeList tradeNodeList = xmlNode.SelectNodes("trade"); if (tradeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in tradeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeIDRef = item.Attributes["id"].Name; Trade ob = Trade(); IDManager.SetID(tradeIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeIDRef = item.Attributes["href"].Name; } else { trade = new Trade(item); } } } XmlNodeList amendmentNodeList = xmlNode.SelectNodes("amendment"); if (amendmentNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in amendmentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { amendmentIDRef = item.Attributes["id"].Name; TradeAmendmentContent ob = TradeAmendmentContent(); IDManager.SetID(amendmentIDRef, ob); } else if (item.Attributes.ToString() == "href") { amendmentIDRef = item.Attributes["href"].Name; } else { amendment = new TradeAmendmentContent(item); } } } XmlNodeList increaseNodeList = xmlNode.SelectNodes("increase"); if (increaseNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in increaseNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { increaseIDRef = item.Attributes["id"].Name; TradeNotionalChange ob = TradeNotionalChange(); IDManager.SetID(increaseIDRef, ob); } else if (item.Attributes.ToString() == "href") { increaseIDRef = item.Attributes["href"].Name; } else { increase = new TradeNotionalChange(item); } } } XmlNodeList terminatingEventNodeList = xmlNode.SelectNodes("terminatingEvent"); if (terminatingEventNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in terminatingEventNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { terminatingEventIDRef = item.Attributes["id"].Name; TerminatingEvent ob = TerminatingEvent(); IDManager.SetID(terminatingEventIDRef, ob); } else if (item.Attributes.ToString() == "href") { terminatingEventIDRef = item.Attributes["href"].Name; } else { terminatingEvent = new TerminatingEvent(item); } } } XmlNodeList terminationNodeList = xmlNode.SelectNodes("termination"); if (terminationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in terminationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { terminationIDRef = item.Attributes["id"].Name; TradeNotionalChange ob = TradeNotionalChange(); IDManager.SetID(terminationIDRef, ob); } else if (item.Attributes.ToString() == "href") { terminationIDRef = item.Attributes["href"].Name; } else { termination = new TradeNotionalChange(item); } } } XmlNodeList novationNodeList = xmlNode.SelectNodes("novation"); if (novationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in novationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { novationIDRef = item.Attributes["id"].Name; TradeNovationContent ob = TradeNovationContent(); IDManager.SetID(novationIDRef, ob); } else if (item.Attributes.ToString() == "href") { novationIDRef = item.Attributes["href"].Name; } else { novation = new TradeNovationContent(item); } } } XmlNodeList optionExerciseNodeList = xmlNode.SelectNodes("optionExercise"); if (optionExerciseNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in optionExerciseNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { optionExerciseIDRef = item.Attributes["id"].Name; OptionExercise ob = OptionExercise(); IDManager.SetID(optionExerciseIDRef, ob); } else if (item.Attributes.ToString() == "href") { optionExerciseIDRef = item.Attributes["href"].Name; } else { optionExercise = new OptionExercise(item); } } } XmlNodeList optionExpiryNodeList = xmlNode.SelectNodes("optionExpiry"); foreach (XmlNode item in optionExpiryNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { optionExpiryIDRef = item.Attributes["id"].Name; List<OptionExpiry> ob = new List<OptionExpiry>(); ob.Add(new OptionExpiry(item)); IDManager.SetID(optionExpiryIDRef, ob); } else if (item.Attributes.ToString() == "href") { optionExpiryIDRef = item.Attributes["href"].Name; } else { optionExpiry.Add(new OptionExpiry(item)); } } } XmlNodeList deClearNodeList = xmlNode.SelectNodes("deClear"); if (deClearNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in deClearNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deClearIDRef = item.Attributes["id"].Name; DeClear ob = DeClear(); IDManager.SetID(deClearIDRef, ob); } else if (item.Attributes.ToString() == "href") { deClearIDRef = item.Attributes["href"].Name; } else { deClear = new DeClear(item); } } } XmlNodeList withdrawalNodeList = xmlNode.SelectNodes("withdrawal"); if (withdrawalNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in withdrawalNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { withdrawalIDRef = item.Attributes["id"].Name; Withdrawal ob = Withdrawal(); IDManager.SetID(withdrawalIDRef, ob); } else if (item.Attributes.ToString() == "href") { withdrawalIDRef = item.Attributes["href"].Name; } else { withdrawal = new Withdrawal(item); } } } XmlNodeList additionalEventNodeList = xmlNode.SelectNodes("additionalEvent"); if (additionalEventNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in additionalEventNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { additionalEventIDRef = item.Attributes["id"].Name; AdditionalEvent ob = AdditionalEvent(); IDManager.SetID(additionalEventIDRef, ob); } else if (item.Attributes.ToString() == "href") { additionalEventIDRef = item.Attributes["href"].Name; } else { additionalEvent = new AdditionalEvent(item); } } } XmlNodeList tradeReferenceInformationNodeList = xmlNode.SelectNodes("tradeReferenceInformation"); if (tradeReferenceInformationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in tradeReferenceInformationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { tradeReferenceInformationIDRef = item.Attributes["id"].Name; TradeReferenceInformation ob = TradeReferenceInformation(); IDManager.SetID(tradeReferenceInformationIDRef, ob); } else if (item.Attributes.ToString() == "href") { tradeReferenceInformationIDRef = item.Attributes["href"].Name; } else { tradeReferenceInformation = new TradeReferenceInformation(item); } } } XmlNodeList partyNodeList = xmlNode.SelectNodes("party"); foreach (XmlNode item in partyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { partyIDRef = item.Attributes["id"].Name; List<Party> ob = new List<Party>(); ob.Add(new Party(item)); IDManager.SetID(partyIDRef, ob); } else if (item.Attributes.ToString() == "href") { partyIDRef = item.Attributes["href"].Name; } else { party.Add(new Party(item)); } } } XmlNodeList accountNodeList = xmlNode.SelectNodes("account"); foreach (XmlNode item in accountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { accountIDRef = item.Attributes["id"].Name; List<Account> ob = new List<Account>(); ob.Add(new Account(item)); IDManager.SetID(accountIDRef, ob); } else if (item.Attributes.ToString() == "href") { accountIDRef = item.Attributes["href"].Name; } else { account.Add(new Account(item)); } } } XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason"); foreach (XmlNode item in reasonNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { reasonIDRef = item.Attributes["id"].Name; List<Reason> ob = new List<Reason>(); ob.Add(new Reason(item)); IDManager.SetID(reasonIDRef, ob); } else if (item.Attributes.ToString() == "href") { reasonIDRef = item.Attributes["href"].Name; } else { reason.Add(new Reason(item)); } } } }
public EventRequestAcknowledgement(XmlNode xmlNode) : base(xmlNode) { XmlNode originalMessageNode = xmlNode.SelectSingleNode("originalMessage"); if (originalMessageNode != null) { if (originalMessageNode.Attributes["href"] != null || originalMessageNode.Attributes["id"] != null) { if (originalMessageNode.Attributes["id"] != null) { originalMessageIDRef_ = originalMessageNode.Attributes["id"].Value; UnprocessedElementWrapper ob = new UnprocessedElementWrapper(originalMessageNode); IDManager.SetID(originalMessageIDRef_, ob); } else if (originalMessageNode.Attributes["href"] != null) { originalMessageIDRef_ = originalMessageNode.Attributes["href"].Value; } else { originalMessage_ = new UnprocessedElementWrapper(originalMessageNode); } } else { originalMessage_ = new UnprocessedElementWrapper(originalMessageNode); } } XmlNode tradeReferenceInformationNode = xmlNode.SelectSingleNode("tradeReferenceInformation"); if (tradeReferenceInformationNode != null) { if (tradeReferenceInformationNode.Attributes["href"] != null || tradeReferenceInformationNode.Attributes["id"] != null) { if (tradeReferenceInformationNode.Attributes["id"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["id"].Value; TradeReferenceInformation ob = new TradeReferenceInformation(tradeReferenceInformationNode); IDManager.SetID(tradeReferenceInformationIDRef_, ob); } else if (tradeReferenceInformationNode.Attributes["href"] != null) { tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["href"].Value; } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } else { tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode); } } XmlNodeList partyNodeList = xmlNode.SelectNodes("party"); if (partyNodeList != null) { this.party_ = new List<Party>(); foreach (XmlNode item in partyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { partyIDRef_ = item.Attributes["id"].Value; party_.Add(new Party(item)); IDManager.SetID(partyIDRef_, party_[party_.Count - 1 ]); } else if (item.Attributes["href"] != null) { partyIDRef_ = item.Attributes["href"].Value; } else { party_.Add(new Party(item)); } } else { party_.Add(new Party(item)); } } } XmlNodeList accountNodeList = xmlNode.SelectNodes("account"); if (accountNodeList != null) { this.account_ = new List<Account>(); foreach (XmlNode item in accountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { accountIDRef_ = item.Attributes["id"].Value; account_.Add(new Account(item)); IDManager.SetID(accountIDRef_, account_[account_.Count - 1 ]); } else if (item.Attributes["href"] != null) { accountIDRef_ = item.Attributes["href"].Value; } else { account_.Add(new Account(item)); } } else { account_.Add(new Account(item)); } } } }