Exemplo n.º 1
0
 public IniReader(IniOptions options)
 {
     this.options = options;
     this.currentEmptyLinesBefore = 0;
     this.currentTrailingComment  = null;
     this.currentSection          = null;
 }
Exemplo n.º 2
0
 // 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;
 }
Exemplo n.º 3
0
        /// <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);
            }
        }
Exemplo n.º 4
0
 public IniWriter(IniOptions options)
 {
     this.options = options;
 }
Exemplo n.º 5
0
 /// <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)
 {
 }