public IWriterInfo SaveWriter()
        {
            /*if (this.Emitter.LastSavedWriter != null && this.Emitter.LastSavedWriter.Output == this.Emitter.Output)
             * {
             *  this.Emitter.LastSavedWriter.IsNewLine = this.Emitter.IsNewLine;
             *  this.Emitter.LastSavedWriter.Level = this.Emitter.Level;
             *  this.Emitter.LastSavedWriter.Comma = this.Emitter.Comma;
             *  return this.Emitter.LastSavedWriter;
             * }*/

            var info = new WriterInfo
            {
                Output    = this.Emitter.Output,
                IsNewLine = this.Emitter.IsNewLine,
                Level     = this.Emitter.Level,
                Comma     = this.Emitter.Comma
            };

            this.Emitter.LastSavedWriter = info;

            return(info);
        }
Esempio n. 2
0
        public IWriterInfo SaveWriter()
        {
            /*if (this.Emitter.LastSavedWriter != null && this.Emitter.LastSavedWriter.Output == this.Emitter.Output)
            {
                this.Emitter.LastSavedWriter.IsNewLine = this.Emitter.IsNewLine;
                this.Emitter.LastSavedWriter.Level = this.Emitter.Level;
                this.Emitter.LastSavedWriter.Comma = this.Emitter.Comma;
                return this.Emitter.LastSavedWriter;
            }*/

            var info = new WriterInfo
            {
                Output = this.Emitter.Output,
                IsNewLine = this.Emitter.IsNewLine,
                Level = this.Emitter.Level,
                Comma = this.Emitter.Comma
            };

            this.Emitter.LastSavedWriter = info;

            return info;
        }