Example #1
0
 protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo)
 {
     if (aXmlReader.IsStartElement("NtryRef"))
     {
         this.m_sNtryRef = aXmlReader.ReadElementString();
     }
     this.m_aAmt.ReadXml(aXmlReader, "Amt");
     if (aXmlReader.IsStartElement("RvslInd"))
     {
         this.m_fRvslInd = XmlConvert.ToBoolean(aXmlReader.ReadElementString());
     }
     this.m_sSts = aXmlReader.ReadElementString("Sts");
     aXmlReader.ReadStartElement("BookgDt");
     this.m_dtBookgDt = SepaUtil.ReadDtOrDtTmXml(aXmlReader);
     aXmlReader.ReadEndElement();
     aXmlReader.ReadStartElement("ValDt");
     this.m_dtValDt = SepaUtil.ReadDtOrDtTmXml(aXmlReader);
     aXmlReader.ReadEndElement();
     if (aXmlReader.IsStartElement("AcctSvcrRef"))
     {
         this.m_sAcctSvcrRef = aXmlReader.ReadElementString();
     }
     while (aXmlReader.IsStartElement("Avlbty"))
     {
         aXmlReader.Skip();
     }
     if (aXmlReader.IsStartElement("BkTxCd"))
     {
         this.m_sBkTxCd = SepaUtil.ReadBkTxCd(aXmlReader, out this.m_sBkTxCdIssr);
     }
     if (aXmlReader.IsStartElement("ComssnWvrInd"))
     {
         aXmlReader.Skip();
     }
     if (aXmlReader.IsStartElement("AddtlInfInd"))
     {
         aXmlReader.ReadStartElement();
         if (aXmlReader.IsStartElement("MsgNmId"))
         {
             this.m_sAddtlInfIndMsgNmId = aXmlReader.ReadElementString();
         }
         if (aXmlReader.IsStartElement("MsgId"))
         {
             this.m_sAddtlInfIndMsgId = aXmlReader.ReadElementString();
         }
         aXmlReader.ReadEndElement();
     }
     if (aXmlReader.IsStartElement("AmtDtls"))
     {
         aXmlReader.Skip();
     }
     while (aXmlReader.IsStartElement("Chrgs"))
     {
         aXmlReader.Skip();
     }
     if (aXmlReader.IsStartElement("TechInptChanl"))
     {
         aXmlReader.Skip();
     }
     while (aXmlReader.IsStartElement("Intrst"))
     {
         aXmlReader.Skip();
     }
     if (aXmlReader.IsStartElement("NtryDtls"))
     {
         aXmlReader.ReadStartElement();
         if (aXmlReader.IsStartElement("Btch"))
         {
             if (aXmlReader.IsEmptyElement)
             {
                 aXmlReader.Skip();
             }
             else
             {
                 aXmlReader.ReadStartElement();
                 while (aXmlReader.IsStartElement())
                 {
                     if (aXmlReader.LocalName == "PmtInfId")
                     {
                         this.m_sBtchPmtInfId = aXmlReader.ReadElementString();
                     }
                     else
                     {
                         aXmlReader.Skip();
                     }
                 }
                 aXmlReader.ReadEndElement();
             }
         }
         while (aXmlReader.IsStartElement("TxDtls"))
         {
             SepaTransactionDetails item = new SepaTransactionDetails();
             item.ReadXml(aXmlReader, aMessageInfo);
             this.m_vTxDtls.Add(item);
         }
         aXmlReader.ReadEndElement();
     }
     if (aXmlReader.IsStartElement("AddtlNtryInf"))
     {
         this.m_sAddtlNtryInf = aXmlReader.ReadElementString();
     }
 }
        protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo)
        {
            if (aXmlReader.IsStartElement("Refs"))
            {
                if (aXmlReader.IsEmptyElement)
                {
                    aXmlReader.Skip();
                }
                else
                {
                    aXmlReader.ReadStartElement();
                    while (aXmlReader.IsStartElement())
                    {
                        string localName = aXmlReader.LocalName;
                        if (localName == null)
                        {
                            goto Label_0085;
                        }
                        if (!(localName == "EndToEndId"))
                        {
                            if (localName == "MndtId")
                            {
                                goto Label_0069;
                            }
                            if (localName == "ChqNb")
                            {
                                goto Label_0077;
                            }
                            goto Label_0085;
                        }
                        this.m_sEndToEndId = aXmlReader.ReadElementString();
                        continue;
Label_0069:
                        this.m_sMndtId = aXmlReader.ReadElementString();
                        continue;
Label_0077:
                        this.m_sChqNb = aXmlReader.ReadElementString();
                        continue;
Label_0085:
                        aXmlReader.Skip();
                    }
                    aXmlReader.ReadEndElement();
                }
            }
            if (aXmlReader.IsStartElement("AmtDtls"))
            {
                aXmlReader.ReadStartElement();
                while (aXmlReader.IsStartElement())
                {
                    string str2;
                    if (((str2 = aXmlReader.LocalName) != null) && (str2 == "TxAmt"))
                    {
                        aXmlReader.ReadStartElement();
                        this.m_aTxAmt.ReadXml(aXmlReader, "Amt");
                        if (aXmlReader.IsStartElement("CcyXchg"))
                        {
                            aXmlReader.Skip();
                        }
                        aXmlReader.ReadEndElement();
                    }
                    else
                    {
                        aXmlReader.Skip();
                    }
                }
                aXmlReader.ReadEndElement();
            }
            while (aXmlReader.IsStartElement("Avlbty"))
            {
                aXmlReader.Skip();
            }
            if (aXmlReader.IsStartElement("BkTxCd"))
            {
                this.m_sBkTxCd = SepaUtil.ReadBkTxCd(aXmlReader, out this.m_sBkTxCdIssr);
            }
            while (aXmlReader.IsStartElement("Chrgs"))
            {
                aXmlReader.Skip();
            }
            while (aXmlReader.IsStartElement("Intrst"))
            {
                aXmlReader.Skip();
            }
            if (aXmlReader.IsStartElement("RltdPties"))
            {
                aXmlReader.ReadStartElement();
                if (aXmlReader.IsStartElement("InitgPty"))
                {
                    aXmlReader.Skip();
                }
                if (aXmlReader.IsStartElement("Dbtr"))
                {
                    this.m_aDbtr.ReadXml(aXmlReader, aMessageInfo);
                }
                if (aXmlReader.IsStartElement("DbtrAcct"))
                {
                    this.m_aDbtrAcct.ReadXml(aXmlReader, aMessageInfo);
                }
                if (aXmlReader.IsStartElement("UltmtDbtr"))
                {
                    aXmlReader.Skip();
                }
                if (aXmlReader.IsStartElement("Cdtr"))
                {
                    this.m_aCdtr.ReadXml(aXmlReader, aMessageInfo);
                }
                if (aXmlReader.IsStartElement("CdtrAcct"))
                {
                    this.m_aCdtrAcct.ReadXml(aXmlReader, aMessageInfo);
                }
                if (aXmlReader.IsStartElement("UltmtCdtr"))
                {
                    aXmlReader.Skip();
                }
                while (aXmlReader.IsStartElement())
                {
                    aXmlReader.Skip();
                }
                aXmlReader.ReadEndElement();
            }
            if (aXmlReader.IsStartElement("RltdAgts"))
            {
                aXmlReader.ReadStartElement();
                if (aXmlReader.IsStartElement("DbtrAgt"))
                {
                    aXmlReader.ReadStartElement();
                    this.m_aDbtrAgt.ReadXml(aXmlReader, aMessageInfo);
                    aXmlReader.ReadEndElement();
                }
                if (aXmlReader.IsStartElement("CdtrAgt"))
                {
                    aXmlReader.ReadStartElement();
                    this.m_aCdtrAgt.ReadXml(aXmlReader, aMessageInfo);
                    aXmlReader.ReadEndElement();
                }
                while (aXmlReader.IsStartElement())
                {
                    aXmlReader.Skip();
                }
                aXmlReader.ReadEndElement();
            }
            if (aXmlReader.IsStartElement("Purp"))
            {
                aXmlReader.ReadStartElement();
                if (aXmlReader.IsStartElement("Cd"))
                {
                    this.m_sPurpCd = aXmlReader.ReadElementString();
                }
                else
                {
                    aXmlReader.Skip();
                }
                aXmlReader.ReadEndElement();
            }
            while (aXmlReader.IsStartElement("RltdRmtInf"))
            {
                aXmlReader.Skip();
            }
            if (aXmlReader.IsStartElement("RmtInf"))
            {
                this.m_vsRmtInf = new List <string>();
                aXmlReader.ReadStartElement();
                while (aXmlReader.IsStartElement("Ustrd"))
                {
                    this.m_vsRmtInf.Add(aXmlReader.ReadElementString());
                }
                while (aXmlReader.IsStartElement("Strd"))
                {
                    aXmlReader.Skip();
                }
                aXmlReader.ReadEndElement();
            }
            while (aXmlReader.IsStartElement())
            {
                if (aXmlReader.LocalName == "RtrInf")
                {
                    aXmlReader.ReadStartElement();
                    if (aXmlReader.IsStartElement("OrgnlBkTxCd"))
                    {
                        aXmlReader.Skip();
                    }
                    if (aXmlReader.IsStartElement("Orgtr"))
                    {
                        aXmlReader.Skip();
                    }
                    if (aXmlReader.IsStartElement("Rsn"))
                    {
                        aXmlReader.ReadStartElement();
                        if (aXmlReader.IsStartElement("Cd"))
                        {
                            this.m_sRtrInfRsnCd = aXmlReader.ReadElementString();
                        }
                        else
                        {
                            aXmlReader.Skip();
                        }
                        aXmlReader.ReadEndElement();
                    }
                    while (aXmlReader.IsStartElement("AddtlInf"))
                    {
                        aXmlReader.Skip();
                    }
                    aXmlReader.ReadEndElement();
                }
                else
                {
                    aXmlReader.Skip();
                }
            }
        }