/// <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; }
private void WriteValue(Dictionary <string, IniFile> iniFiles, IniFiles iniFile, IniFileSections section, string keyName, string keyValue) { WriteValue(iniFiles, iniFile, SectionNames[section], keyName, keyValue); }
private void WriteSection(Dictionary <string, IniFile> iniFiles, IniFiles iniFile, IniFileSections section, string[] values) { WriteSection(iniFiles, iniFile, SectionNames[section], values); }
/// <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; }
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); }
private string[] ReadSection(Dictionary <string, IniFile> iniFiles, IniFiles iniFile, IniFileSections section) { return(ReadSection(iniFiles, iniFile, SectionNames[section])); }
public void WriteSection(IniFiles iniFile, IniFileSections section, string[] values) { WriteSection(iniFile, SectionNames[section], values); }
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]); }