protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo) { if (aMessageInfo.MessageType != SepaMessageType.CreditTransferPaymentInitiation) { throw new ArgumentException(); } base.ReadPmtInfIdXml(aXmlReader); base.ReadPmtMtdXml(aXmlReader); if (aMessageInfo.Version >= 3) { base.ReadBtchBookg(aXmlReader); base.ReadNbOfTxs(aXmlReader); base.ReadCtrlSum(aXmlReader); } aXmlReader.ReadStartElement("PmtTpInf"); if (aXmlReader.IsStartElement("InstrPrty")) { this.m_sInstrPrty = aXmlReader.ReadElementString(); } aXmlReader.ReadStartElement("SvcLvl"); this.m_sSvcLvlCd = aXmlReader.ReadElementString("Cd"); aXmlReader.ReadEndElement(); base.ReadCtgyPurp(aXmlReader, aMessageInfo.Version >= 3); aXmlReader.ReadEndElement(); this.m_dtReqdExctnDt = SepaUtil.ReadDtXml(aXmlReader, "ReqdExctnDt"); this.m_aDbtr.ReadXml(aXmlReader, aMessageInfo); this.m_tDbtrAcctIBAN = SepaUtil.ReadAcctXml(aXmlReader, "DbtrAcct", out this.m_sDbtrAcctCcy); this.m_tDbtrAgtBIC = SepaUtil.ReadAgtBIC(aXmlReader, "DbtrAgt"); if (aXmlReader.IsStartElement("UltmtDbtr")) { this.m_aUltmtDbtr.ReadXml(aXmlReader, aMessageInfo); } if (aXmlReader.IsStartElement("ChrgBr")) { aXmlReader.ReadElementString(); } while (aXmlReader.IsStartElement("CdtTrfTxInf")) { SepaCreditTransferTransactionInformation item = (SepaCreditTransferTransactionInformation)this.NewTransactionInformation(); item.ReadXml(aXmlReader, aMessageInfo); base.TransactionInformations.Add(item); } }
protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo) { string str2; if (aMessageInfo.MessageType != SepaMessageType.DirectDebitPaymentInitiation) { throw new ArgumentException(); } base.ReadPmtIdXml(aXmlReader); base.ReadInstdAmtXml(aXmlReader); if (aXmlReader.IsStartElement("ChrgBr")) { aXmlReader.Skip(); } aXmlReader.ReadStartElement("DrctDbtTx"); aXmlReader.ReadStartElement("MndtRltdInf"); this.m_sMndtId = aXmlReader.ReadElementString("MndtId"); this.m_dtMndtDtOfSgntr = SepaUtil.ReadDtXml(aXmlReader, "DtOfSgntr"); bool flag = false; if (aXmlReader.IsStartElement("AmdmntInd")) { flag = XmlConvert.ToBoolean(aXmlReader.ReadElementString()); } if (flag) { aXmlReader.ReadStartElement("AmdmntInfDtls"); if (aXmlReader.IsStartElement("OrgnlMndtId")) { this.m_sOrgnlMndtId = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("OrgnlCdtrSchmeId")) { aXmlReader.ReadStartElement(); if (aXmlReader.IsStartElement("Nm")) { this.m_sOrgnlCdtrNm = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("Id")) { this.m_sOrgnlCdtrSchmeId = SepaUtil.ReadSepaIdXml(aXmlReader); } aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("OrgnlDbtrAcct")) { string str; this.m_tOrgnlDbtrAcctIBAN = SepaUtil.ReadAcctXml(aXmlReader, "OrgnlDbtrAcct", out str); } if (aXmlReader.IsStartElement("OrgnlDbtrAgt")) { aXmlReader.Skip(); this.m_fSMNDA = true; } aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("ElctrncSgntr")) { aXmlReader.Skip(); } aXmlReader.ReadEndElement(); if (aXmlReader.IsStartElement("CdtrSchmeId")) { this.m_sCdtrSchmeIdRead = SepaUtil.ReadCdtrSchmeIdXml(aXmlReader); } aXmlReader.ReadEndElement(); if (aXmlReader.IsStartElement("UltmtCdtr")) { aXmlReader.Skip(); } this.m_tDbtrAgtBIC = SepaUtil.ReadAgtBIC(aXmlReader, "DbtrAgt"); this.m_aDbtr.ReadXml(aXmlReader, aMessageInfo); this.m_tDbtrAcctIBAN = SepaUtil.ReadAcctXml(aXmlReader, "DbtrAcct", out str2); if (aXmlReader.IsStartElement("UltmtDbtr")) { this.m_aUltmtDbtr.ReadXml(aXmlReader, aMessageInfo); } base.ReadPurpXml(aXmlReader); base.ReadRmtInfXml(aXmlReader); }
protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo) { if (aMessageInfo.MessageType != SepaMessageType.DirectDebitPaymentInitiation) { throw new ArgumentException(); } base.ReadPmtInfIdXml(aXmlReader); base.ReadPmtMtdXml(aXmlReader); if (aMessageInfo.Version >= 2) { base.ReadBtchBookg(aXmlReader); base.ReadNbOfTxs(aXmlReader); base.ReadCtrlSum(aXmlReader); } aXmlReader.ReadStartElement("PmtTpInf"); aXmlReader.ReadStartElement("SvcLvl"); aXmlReader.ReadElementString("Cd"); aXmlReader.ReadEndElement(); if (aXmlReader.IsStartElement("LclInstrm")) { aXmlReader.ReadStartElement(); this.m_sLclInstrmCd = aXmlReader.ReadElementString("Cd"); aXmlReader.ReadEndElement(); } this.m_sSeqTp = aXmlReader.ReadElementString("SeqTp"); base.ReadCtgyPurp(aXmlReader, aMessageInfo.Version >= 2); aXmlReader.ReadEndElement(); this.m_dtReqdColltnDt = SepaUtil.ReadDtXml(aXmlReader, "ReqdColltnDt"); this.m_aCdtr.ReadXml(aXmlReader, aMessageInfo); this.m_tCdtrAcctIBAN = SepaUtil.ReadAcctXml(aXmlReader, "CdtrAcct", out this.m_sCdtrAcctCcy); this.m_tCdtrAgtBIC = SepaUtil.ReadAgtBIC(aXmlReader, "CdtrAgt"); if (aXmlReader.IsStartElement("UltmtCdtr")) { this.m_aUltmtCdtr.ReadXml(aXmlReader, aMessageInfo); } if (aXmlReader.IsStartElement("ChrgBr")) { aXmlReader.ReadElementString("ChrgBr"); } if (aXmlReader.IsStartElement("CdtrSchmeId")) { this.m_sCdtrSchmeId = SepaUtil.ReadCdtrSchmeIdXml(aXmlReader); } while (aXmlReader.IsStartElement("DrctDbtTxInf")) { SepaDirectDebitTransactionInformation item = (SepaDirectDebitTransactionInformation)this.NewTransactionInformation(); item.ReadXml(aXmlReader, aMessageInfo); base.TransactionInformations.Add(item); string creditorSchemeIdentificationRead = item.CreditorSchemeIdentificationRead; if (creditorSchemeIdentificationRead != null) { if (this.m_sCdtrSchmeId == null) { this.m_sCdtrSchmeId = creditorSchemeIdentificationRead; } else if (this.m_sCdtrSchmeId != creditorSchemeIdentificationRead) { throw new XmlException(); } } } }
protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo) { if (aXmlReader.IsStartElement("StsId")) { this.m_sStsId = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("OrgnlInstrId")) { this.m_sOrgnlInstrId = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("OrgnlEndToEndId")) { this.m_sOrgnlEndToEndId = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("TxSts")) { if (aXmlReader.ReadElementString() != "RJCT") { throw new XmlException("Unsupported TxSts"); } while (aXmlReader.IsStartElement("StsRsnInf")) { SepaStatusReasonInformation item = new SepaStatusReasonInformation(); item.ReadXml(aXmlReader, aMessageInfo); this.m_vStsRsnInfs.Add(item); } } aXmlReader.ReadStartElement("OrgnlTxRef"); if (aXmlReader.IsStartElement("Amt")) { aXmlReader.ReadStartElement(); this.m_aAmt.ReadXml(aXmlReader, "InstdAmt"); aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("ReqdExctnDt")) { this.m_dtReqdDt = SepaUtil.ReadDtXml(aXmlReader, "ReqdExctnDt"); } if (aXmlReader.IsStartElement("ReqdColltnDt")) { if (this.m_dtReqdDt > DateTime.MinValue) { throw new XmlException(); } this.m_dtReqdDt = SepaUtil.ReadDtXml(aXmlReader, "ReqdColltnDt"); } if (aXmlReader.IsStartElement("CdtrSchmeId")) { this.m_sCdtrSchmeId = SepaUtil.ReadCdtrSchmeIdXml(aXmlReader); } if (aXmlReader.IsStartElement("PmtTpInf")) { aXmlReader.ReadStartElement(); if (aXmlReader.IsStartElement("InstrPrty")) { this.m_sInstrPrty = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("SvcLvl")) { aXmlReader.ReadStartElement(); string str2 = aXmlReader.ReadElementString("Cd"); aXmlReader.ReadEndElement(); if (str2 != "SEPA") { throw new XmlException(); } } if (aXmlReader.IsStartElement("LclInstrm")) { aXmlReader.ReadStartElement(); this.m_sLclInstrmCd = aXmlReader.ReadElementString("Cd"); aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("SeqTp")) { this.m_sSeqTp = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("CtgyPurp")) { aXmlReader.ReadStartElement(); this.m_sCtgyPurp = aXmlReader.ReadElementString("Cd"); aXmlReader.ReadEndElement(); } aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("MndtRltdInf")) { aXmlReader.ReadStartElement(); if (aXmlReader.IsStartElement("MndtId")) { this.m_sMndtId = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("DtOfSgntr")) { this.m_dtMndtDtOfSgntr = SepaUtil.ReadDtXml(aXmlReader, "DtOfSgntr"); } if (aXmlReader.IsStartElement("AmdmntInd")) { aXmlReader.Skip(); } if (aXmlReader.IsStartElement("AmdmntInfDtls")) { aXmlReader.Skip(); } if (aXmlReader.IsStartElement("ElctrncSgntr")) { aXmlReader.Skip(); } aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("RmtInf")) { aXmlReader.ReadStartElement(); if (aXmlReader.IsStartElement("Ustrd")) { this.m_sRmtInf = aXmlReader.ReadElementString(); } else if (aXmlReader.IsStartElement("Strd")) { this.m_sRmtInf = aXmlReader.ReadInnerXml(); this.m_fRmtInfStrd = true; } aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("UltmtDbtr")) { aXmlReader.Skip(); } if (aXmlReader.IsStartElement("Dbtr")) { this.m_aDbtr.ReadXml(aXmlReader, aMessageInfo); } if (aXmlReader.IsStartElement("DbtrAcct")) { this.m_tDbtrAcctIBAN = SepaUtil.ReadAcctXml(aXmlReader, "DbtrAcct", out this.m_sDbtrAcctCcy); } if (aXmlReader.IsStartElement("DbtrAgt")) { this.m_tDbtrAgtBIC = SepaUtil.ReadAgtBIC(aXmlReader, "DbtrAgt"); } if (aXmlReader.IsStartElement("CdtrAgt")) { this.m_tCdtrAgtBIC = SepaUtil.ReadAgtBIC(aXmlReader, "CdtrAgt"); } if (aXmlReader.IsStartElement("Cdtr")) { this.m_aCdtr.ReadXml(aXmlReader, aMessageInfo); } if (aXmlReader.IsStartElement("CdtrAcct")) { this.m_tCdtrAcctIBAN = SepaUtil.ReadAcctXml(aXmlReader, "CdtrAcct", out this.m_sCdtrAcctCcy); } if (aXmlReader.IsStartElement("UltmtCdtr")) { aXmlReader.Skip(); } aXmlReader.ReadEndElement(); }