https://github.com/emako/fischless.configuration
A simple configuration library used for Fischless.
https://github.com/emako/fischless.configuration
configuration fischless
Last synced: 6 months ago
JSON representation
A simple configuration library used for Fischless.
- Host: GitHub
- URL: https://github.com/emako/fischless.configuration
- Owner: emako
- License: mit
- Created: 2024-10-22T17:54:46.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-10-10T06:47:18.000Z (10 months ago)
- Last Synced: 2025-11-14T13:20:40.358Z (8 months ago)
- Topics: configuration, fischless
- Language: C#
- Homepage: https://www.nuget.org/packages/Fischless.Configuration/
- Size: 105 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://nuget.org/packages/Fischless.Configuration) [](https://github.com/emako/Fischless.Configuration/blob/master/LICENSE) [](https://github.com/emako/Fischless.Configuration/actions/workflows/library.nuget.yml)
# Fischless.Configuration
A simple configuration library used for [Fischless](https://github.com/GenshinMatrix/Fischless).
The library may not offer the highest performance, but it is highly convenient to use.
Install `ConfigurationSerializer` from nuget:
| Name | Nuget |
| ---------------------------- | ------------------------------------------------------------ |
| Fischless.Configuration.Json | [](https://nuget.org/packages/Fischless.Configuration.Json) |
| Fischless.Configuration.Yaml | [](https://nuget.org/packages/Fischless.Configuration.Yaml) |
| Fischless.Configuration.Ini | Not available |
Another configuration library [here](https://github.com/lemutec/LyricStudio/tree/master/src/Desktop/LyricStudio/Core/Configuration) used for LyricStudio.
## Usage
1. Definition of yours in `Configurations.cs`.
```c#
public static class Configurations
{
public static ConfigurationDefinition Language { get; } = new(nameof(Language), string.Empty);
}
```
2. Use `ConfigurationManager` to read and write configurations file.
```c#
// Configurations setup of ConfigurationSerializer and FileName.
ConfigurationManager.ConfigurationSerializer = new JsonConfigurationSerializer(); // YamlConfigurationSerializer
ConfigurationManager.Setup(ConfigurationSpecialPath.GetPath($"config.yaml", "yourAppName", Environment.SpecialFolder.MyDocuments));
// Configurations Getter and Setter
string lang1 = Configurations.Language.Get();
Configurations.Language.Set("en");
string lang2 = Configurations.Language.Get();
// Save Configurations into your file.
ConfigurationManager.Save();
```