Exemplo n.º 1
0
        private void EnsureReader()
        {
            if (this.doc == null)
            {
                Stream stream = new TTransportStream(trans);

                this.doc     = XDocument.Load(stream);
                this.element = new XElement("root", doc.Root);
                this.stack.Push(new StructContext(this));
            }
        }
Exemplo n.º 2
0
        private void EnsureWriter()
        {
            if (this.writer == null)
            {
                Stream            stream         = new TTransportStream(trans);
                XmlWriterSettings writerSettings = new XmlWriterSettings
                {
                    Indent             = true,
                    IndentChars        = "  ",
                    OmitXmlDeclaration = true,
                };

                this.writer = XmlWriter.Create(stream, writerSettings);
                this.stack.Push(new StructContext(this));
            }
        }
Exemplo n.º 3
0
        private void EnsureReader()
        {
            if (this.reader == null)
            {
                Stream stream = new TTransportStream(trans);

                XmlReaderSettings readerSettings = new XmlReaderSettings
                {
                    IgnoreProcessingInstructions = true,
                    IgnoreWhitespace             = true,
                    IgnoreComments = true,
                };

                this.reader = XmlReader.Create(stream, readerSettings);
                this.stack.Push(new StructContext(this));
            }
        }