- .NET 5
- Newtonsoft.Json (>= 13.0.1)
- YamlDotNet (>= 11.2.1)
Install-Package SerializedConfig
dotnet add package SerializedConfig
See also in NuGet Gallery
[ConfigSection]
public class ConfigurationModel : IConfigurationModel
{
public Person person { get; set; }
public Person anotherPerson { get; set; }
}
ConfigurationModel configurationModel = new()
{
person = new()
{
name = "Bob",
age = 68
},
anotherPerson = new()
{
name = "Anders",
age = 60
}
};
ConfigManager<ConfigurationModel> configManager = new(Consts.SAVE_FILE_PATH_YAML, SerializationFormat.Yaml, configurationModel);
configManager.Save();
Access the documentation on Wiki