DotIni is a library for .Net that allows you to serialize and deserialize INI files. This is not a Json/XML (des)serializer in any way, shape or form, it is intended to work only with ini files as shown bellow:
[section]
attribute=value
We are currently in alpha version and we advise to not use in a production environment in any way whatsoever.
Our profile on the NuGet library brokenegg.io
Use the package manager NuGet to install DotIni.
nuget install brokenegg.dotini
using Brokenegg.DotIni;
//instantiating the inifile object
var iniFile = new IniFile();
//adding section
iniFile.AddSection("section");
//adding key-par
iniFile.AddKeyParLastSection("lang", "enUS");
//parsing to string
var content = IniConvert.SerializeObject(file);
The serialization value in the variable content
should be this one:
[section]
lang=enUS
using System.IO;
using Brokenegg.DotIni;
// reading a file
var file = File.ReadAllLines("test.ini");
//parsing file
var iniFile = IniConvert.DeserializeObject(file);
iniFile
will be the instance of Brokenegg.DotIni.IniFile, responsible for handling the sections and key-par values of an INI file.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
- Implement basic serialization and deserialization to be used. Planned to v0.0.4;
- Cover at least 60% of the projects on unity tests. Planned to v0.1.0;
- Allow to convert any class into an INI file structure. Planned to v0.2.0;
- Start github wiki page and begin documentation;
- Convert values from Key-par values to String/Int/Decimal and Date. Planned to v0.3.0.