public override bool Read()
        {
            if (this.state.IsEOF)
            {
                return(false);
            }

            PTXReaderState newState = state.Accept(this, reader);

            this.state = newState;
            return(true);
        }
        internal PropertyTreeXmlReader(XmlReader reader)
        {
            this.reader = reader;
            this.readerLineInfoCache = (reader as IXmlLineInfo) ?? Utility.NullLineInfo;

            if (this.reader.ReadState == XReadState.Interactive) {
                this.state = PTXReaderState.ChooseState(reader);
                this.state.Accept(this, reader);

            } else {
                this.state = PTXReaderState.Initial;
            }
        }
        internal PropertyTreeXmlReader(XmlReader reader, Uri baseUri)
        {
            this.reader = reader;
            this.readerLineInfoCache = (reader as IXmlLineInfo) ?? Utility.NullLineInfo;
            _baseUri = baseUri;

            if (this.reader.ReadState == XReadState.Interactive)
            {
                this.state = PTXReaderState.ChooseState(reader);
                this.state.Accept(this, reader);
            }
            else
            {
                this.state = PTXReaderState.Initial;
            }
        }
 bool SetState(PTXReaderState next)
 {
     this.state = next;
     return(true);
 }
 bool SetState(PTXReaderState next)
 {
     this.state = next;
     return true;
 }
        public override bool Read()
        {
            if (this.state.IsEOF)
                return false;

            PTXReaderState newState = state.Accept(this, reader);
            this.state = newState;
            return true;
        }