Esempio n. 1
0
        public INXmlElementReader GetNextChildNode()
        {
            INXmlElementReader reader = null;

            if (inputStream.Seek('<', '>'))
            {
                inputStream.Seek(1, SeekOrigin.Current);
                var closingElement = inputStream.Peek() == '/';
                inputStream.Seek(-1, SeekOrigin.Current);

                if (!closingElement)
                {
                    reader = new XmlElementReaderFactory(inputStream).Create();
                }
            }

            return(reader);
        }
Esempio n. 2
0
        public MetaData Read(XmlStreamReader inputStream)
        {
            MetaData metaData;

            if (inputStream.SeekFromEnd(string.Format("<c type=\"{0}\"", typeof(MetaData).FullName)))
            {
                using (var nodeReader = new XmlElementReaderFactory(inputStream).Create())
                {
                    metaData = (MetaData)objectReader.Get(nodeReader);
                }
            }
            else
            {
                throw new UnableToReadXMLTextException("Missing metadata.");
            }

            return(metaData);
        }
Esempio n. 3
0
        public INXmlElementReader GetNextChildNode()
        {
            INXmlElementReader reader = null;

            if (inputStream.Seek('<', '>'))
            {
                inputStream.Seek(1, SeekOrigin.Current);
                var closingElement = inputStream.Peek() == '/';
                inputStream.Seek(-1, SeekOrigin.Current);

                if (!closingElement)
                {
                    reader = new XmlElementReaderFactory(inputStream).Create();
                }
            }

            return reader;
        }
Esempio n. 4
0
        public Payload Read(XmlStreamReader inputStream)
        {
            Payload payload;

            inputStream.Seek(0, SeekOrigin.Begin);
            if (inputStream.Seek("<c type=\"!0\""))
            {
                using (var nodeReader = new XmlElementReaderFactory(inputStream).Create())
                {
                    payload = (Payload) objectReader.Get(nodeReader);
                }
            }
            else
            {
                throw new UnableToReadXMLTextException("Missing payload.");
            }

            return payload;
        }
Esempio n. 5
0
        public Payload Read(XmlStreamReader inputStream)
        {
            Payload payload;

            inputStream.Seek(0, SeekOrigin.Begin);
            if (inputStream.Seek("<c type=\"!0\""))
            {
                using (var nodeReader = new XmlElementReaderFactory(inputStream).Create())
                {
                    payload = (Payload)objectReader.Get(nodeReader);
                }
            }
            else
            {
                throw new UnableToReadXMLTextException("Missing payload.");
            }

            return(payload);
        }