//----------------------------------------------------------------------------- // Constructor //----------------------------------------------------------------------------- /// <summary>Constructs the ini document.</summary> public IniDocument() { this.assignmentStyle = IniAssignmentStyle.EqualsSpaced; this.commentStyle = IniCommentStyle.SemicolonSpaced; this.maxLineLength = int.MaxValue; this.sectionSpacing = 1; this.keepComments = true; this.strictFormatting = false; this.escapeEnabled = false; this.sections = new Dictionary <string, IniSection>(); // Add the global section Add(""); }
/// <summary>Gets the string representation of the ini comment style.</summary> public static string GetString(this IniCommentStyle commentStyle) { switch (commentStyle) { case IniCommentStyle.Semicolon: return(";"); case IniCommentStyle.Pound: return("#"); case IniCommentStyle.Exclamation: return("!"); case IniCommentStyle.SemicolonSpaced: return("; "); case IniCommentStyle.PoundSpaced: return("# "); case IniCommentStyle.ExclamationSpaced: return("! "); } return(""); }