public IniReader(IniOptions options) { this.options = options; this.currentEmptyLinesBefore = 0; this.currentTrailingComment = null; this.currentSection = null; }
// Deep copy constructor. internal IniOptions(IniOptions options) { this.encoding = options.encoding; this.CommentStarter = options.CommentStarter; this.Compression = options.Compression; this.EncryptionPassword = options.EncryptionPassword; this.KeyDelimiter = options.KeyDelimiter; this.KeyDuplicate = options.KeyDuplicate; this.KeyNameCaseSensitive = options.KeyNameCaseSensitive; this.KeySpaceAroundDelimiter = options.KeySpaceAroundDelimiter; this.SectionDuplicate = options.SectionDuplicate; this.SectionNameCaseSensitive = options.SectionNameCaseSensitive; this.SectionWrapper = options.SectionWrapper; }
/// <summary> /// Initializes a new instance of <see cref="IniFile"/> class. /// </summary> /// <param name="options"><see cref="IniOptions"/> object that defines INI file's format, settings for both <see cref="O:MadMilkman.Ini.IniFile.Load">Load</see> and <see cref="O:MadMilkman.Ini.IniFile.Save">Save</see> methods.</param> /// <param name="filePath">Path from which to load a file</param> public IniFile(string filePath, IniOptions options) { if (options == null) { throw new ArgumentNullException("options"); } this.options = new IniOptions(options); this.sections = new IniSectionCollection(this, options.SectionDuplicate, options.SectionNameCaseSensitive); if (filePath != null) { Load(filePath); } }
public IniWriter(IniOptions options) { this.options = options; }
/// <summary> /// Initializes a new instance of <see cref="IniFile"/> class. /// </summary> /// <param name="options"><see cref="IniOptions"/> object that defines INI file's format, settings for both <see cref="O:MadMilkman.Ini.IniFile.Load">Load</see> and <see cref="O:MadMilkman.Ini.IniFile.Save">Save</see> methods.</param> public IniFile(IniOptions options) : this(null, options) { }