forked from Rampastring/Rampastring.Tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IIniFile.cs
44 lines (40 loc) · 1.98 KB
/
IIniFile.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System.Collections.Generic;
using System.IO;
namespace Rampastring.Tools
{
public interface IIniFile
{
// TODO take documentation comments from IniFile
bool AllowNewSections { get; set; }
string FileName { get; set; }
void AddSection(IniSection section);
void AddSection(string sectionName);
void RemoveSection(string sectionName);
void CombineSections(string firstSectionName, string secondSectionName);
void EraseSectionKeys(string sectionName);
bool GetBooleanValue(string section, string key, bool defaultValue);
double GetDoubleValue(string section, string key, double defaultValue);
int GetIntValue(string section, string key, int defaultValue);
string GetPathStringValue(string section, string key, string defaultValue);
IniSection GetSection(string name);
List<string> GetSectionKeys(string sectionName);
List<string> GetSections();
float GetSingleValue(string section, string key, float defaultValue);
string GetStringValue(string section, string key, string defaultValue);
string GetStringValue(string section, string key, string defaultValue, out bool success);
bool KeyExists(string sectionName, string keyName);
void Parse();
void Reload();
bool SectionExists(string sectionName);
void SetBooleanValue(string section, string key, bool value);
void SetDoubleValue(string section, string key, double value);
void SetIntValue(string section, string key, int value);
void SetSingleValue(string section, string key, double value, int decimals);
void SetSingleValue(string section, string key, float value);
void SetSingleValue(string section, string key, float value, int decimals);
void SetStringValue(string section, string key, string value);
void WriteIniFile();
void WriteIniFile(string filePath);
void WriteIniStream(Stream stream);
}
}