/// <summary>
        /// Attribute for the IniFile serializer
        /// </summary>
        /// <param name="File">The file into which the setting should be serialized.</param>
        /// <param name="Section">The section in the ini file.</param>
        /// <param name="Key">The key within the section.  Defaults to the same name as the attributed field.</param>
        public IniFileEntryAttribute(IniFiles file, IniFileSections section, string key = "")
        {
            this.File    = file;
            this.Section = section;
            this.Key     = key;

            this.QuotedString = QuotedStringType.False;
        }
        /// <summary>
        /// Attribute for the IniFile serializer
        /// </summary>
        /// <param name="File">The file into which the setting should be serialized.</param>
        /// <param name="Section">The section in the ini file.</param>
        /// <param name="Key">The key within the section.  Defaults to the same name as the attributed field.</param>
        public IniFileEntryAttribute(IniFiles file, IniFileSections section, string key = "", ServerProfileCategory category = ServerProfileCategory.Unknown)
        {
            this.File = file;
            this.Section = section;
            this.Key = key;
            this.Category = category;

            this.QuotedString = QuotedStringType.False;
        }
Esempio n. 3
0
 private void WriteValue(Dictionary <string, IniFile> iniFiles, IniFiles iniFile, IniFileSections section, string keyName, string keyValue)
 {
     WriteValue(iniFiles, iniFile, SectionNames[section], keyName, keyValue);
 }
Esempio n. 4
0
 private void WriteSection(Dictionary <string, IniFile> iniFiles, IniFiles iniFile, IniFileSections section, string[] values)
 {
     WriteSection(iniFiles, iniFile, SectionNames[section], values);
 }
Esempio n. 5
0
 /// <summary>
 /// Attribute for the IniFile serializer
 /// </summary>
 /// <param name="File">The file into which the setting should be serialized.</param>
 /// <param name="Section">The section in the ini file.</param>
 /// <param name="Key">The key within the section.  Defaults to the same name as the attributed field.</param>
 public IniFileEntryAttribute(IniFiles file, IniFileSections section, string key = "")
 {
     this.File    = file;
     this.Section = section;
     this.Key     = key;
 }
Esempio n. 6
0
        private string ReadValue(Dictionary <string, IniFile> iniFiles, IniFiles iniFile, IniFileSections section, string keyName)
        {
            ReadFile(iniFiles, iniFile);

            if (!iniFiles.ContainsKey(FileNames[iniFile]))
            {
                return(string.Empty);
            }

            return(iniFiles[FileNames[iniFile]].GetKey(SectionNames[section], keyName)?.KeyValue ?? string.Empty);
        }
Esempio n. 7
0
 private string[] ReadSection(Dictionary <string, IniFile> iniFiles, IniFiles iniFile, IniFileSections section)
 {
     return(ReadSection(iniFiles, iniFile, SectionNames[section]));
 }
Esempio n. 8
0
 public void WriteSection(IniFiles iniFile, IniFileSections section, string[] values)
 {
     WriteSection(iniFile, SectionNames[section], values);
 }
Esempio n. 9
0
 public string[] ReadSection(IniFiles iniFile, IniFileSections section)
 {
     return(ReadSection(iniFile, SectionNames[section]));
 }
 /// <summary>
 /// Attribute for the IniFile serializer
 /// </summary>
 /// <param name="File">The file into which the setting should be serialized.</param>
 /// <param name="Section">The section in the ini file.</param>
 /// <param name="Key">The key within the section.  Defaults to the same name as the attributed field.</param>
 public IniFileEntryAttribute(IniFiles File, IniFileSections Section, string Key = "")
 {
     this.File    = File;
     this.Section = Section;
     this.Key     = Key;
 }
 public void IniWriteSection(IniFileSections Section, string[] values, IniFiles File)
 {
     IniWriteSection(SectionNames[Section], values, FileNames[File]);
 }
 public string[] IniReadSection(IniFileSections Section, IniFiles File)
 {
     return(IniReadSection(SectionNames[Section], FileNames[File]));
 }
 public void IniWriteValue(IniFileSections Section, string Key, string Value, IniFiles File)
 {
     IniWriteValue(SectionNames[Section], Key, Value, FileNames[File]);
 }