コード例 #1
0
        /// <summary>
        /// Read the head of a Data Message. This should be done first before calling the Read method.
        /// </summary>
        /// <returns>The header instance.</returns>
        public Header ReadHeader(Action <ValidationMessage> validationAction)
        {
            CheckDisposed();

            while (XmlReader.Read() && XmlReader.LocalName != "Header" && XmlReader.LocalName != "DataSet")
            {
                continue;
            }

            if (XmlReader.LocalName == "Header")
            {
                var map = new OXM.FragmentMap <Header>(Namespaces.Message + "Header", new HeaderMap());
                return(map.ReadXml(XmlReader, ValidationMessage.CastDelegate(validationAction)));
            }

            return(null);
        }
コード例 #2
0
        /// <summary>
        /// Read the head of a Data Message. This should be done first before calling the Read method.
        /// </summary>
        /// <returns>The header instance.</returns>
        public Header ReadHeader(Action<ValidationMessage> validationAction)
        {
            CheckDisposed();

            while (XmlReader.Read() && XmlReader.LocalName != "Header" && XmlReader.LocalName != "DataSet")
                continue;

            if (XmlReader.LocalName == "Header")
            {
                var map = new OXM.FragmentMap<Header>(Namespaces.Message + "Header", new HeaderMap());
                return map.ReadXml(XmlReader, ValidationMessage.CastDelegate(validationAction));
            }

            return null;
        }