From 853958acdaabc04625ebc390ca3255d51b049b36 Mon Sep 17 00:00:00 2001 From: Philip Schell Date: Thu, 7 Mar 2019 15:08:21 +0100 Subject: [PATCH] Lineendings --- litjson/JsonWriter.cs | 94 +++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/litjson/JsonWriter.cs b/litjson/JsonWriter.cs index babe9ca..8b80e4a 100644 --- a/litjson/JsonWriter.cs +++ b/litjson/JsonWriter.cs @@ -1,43 +1,43 @@ -#region Header -/** - * JsonWriter.cs - * Stream-like facility to output JSON text. - * - * The authors disclaim copyright to this source code. For more details, see - * the COPYING file included with this distribution. - **/ -#endregion - - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Text; - - -namespace LitJson -{ - internal enum Condition - { - InArray, - InObject, - NotAProperty, - Property, - Value - } - - internal class WriterContext - { - public Int32 Count; - public Boolean InArray; - public Boolean InObject; - public Boolean ExpectingValue; - public Int32 Padding; +#region Header +/** + * JsonWriter.cs + * Stream-like facility to output JSON text. + * + * The authors disclaim copyright to this source code. For more details, see + * the COPYING file included with this distribution. + **/ +#endregion + + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Text; + + +namespace LitJson +{ + internal enum Condition + { + InArray, + InObject, + NotAProperty, + Property, + Value + } + + internal class WriterContext + { + public Int32 Count; + public Boolean InArray; + public Boolean InObject; + public Boolean ExpectingValue; + public Int32 Padding; } public class JsonWriter { - #region Fields + #region Fields private static readonly NumberFormatInfo number_format; private WriterContext context; @@ -51,10 +51,10 @@ namespace LitJson private Boolean validate; private Boolean lower_case_properties; private TextWriter writer; - #endregion + #endregion - #region Properties + #region Properties public Int32 IndentValue { get { return this.indent_value; } set { @@ -81,10 +81,10 @@ namespace LitJson get { return this.lower_case_properties; } set { this.lower_case_properties = value; } } - #endregion + #endregion - #region Constructors + #region Constructors static JsonWriter() { number_format = NumberFormatInfo.InvariantInfo; } @@ -105,10 +105,10 @@ namespace LitJson Init(); } - #endregion + #endregion - #region Private Methods + #region Private Methods private void DoValidation(Condition cond) { if (!this.context.ExpectingValue) { this.context.Count++; @@ -282,7 +282,7 @@ namespace LitJson this.indentation -= this.indent_value; } } - #endregion + #endregion public override String ToString() { @@ -449,7 +449,7 @@ namespace LitJson this.context.Padding = propertyName.Length; } - for (Int32 i = this.context.Padding - propertyName.Length; + for (Int32 i = this.context.Padding - propertyName.Length; i >= 0; i--) { this.writer.Write(' '); } @@ -461,5 +461,5 @@ namespace LitJson this.context.ExpectingValue = true; } - } -} + } +}