PreferenceGroups 0.0.9-alpha
See the version list below for details.
dotnet add package PreferenceGroups --version 0.0.9-alpha
NuGet\Install-Package PreferenceGroups -Version 0.0.9-alpha
<PackageReference Include="PreferenceGroups" Version="0.0.9-alpha" />
<PackageVersion Include="PreferenceGroups" Version="0.0.9-alpha" />
<PackageReference Include="PreferenceGroups" />
paket add PreferenceGroups --version 0.0.9-alpha
#r "nuget: PreferenceGroups, 0.0.9-alpha"
#:package PreferenceGroups@0.0.9-alpha
#addin nuget:?package=PreferenceGroups&version=0.0.9-alpha&prerelease
#tool nuget:?package=PreferenceGroups&version=0.0.9-alpha&prerelease
PreferenceGroups
The PreferenceGroups
package is a library for user preferences, orgainzed by groups of primative types, with metadata like a description of the prefence and utilizes a file store using the JSON with comments file format (the *.jsonc
file extension). The motivation is to better encapsulate preferences so from the developer implementing them, to the user being presented with them, and to the file store with comments, the context is preserved throughout.
A Preference
is the the basic unit of the library and it has an associated Name
and Value
, along with some additional metadata like what the DefaultValue
is. A PreferenceGroup
is a dictionary of Preference
s where the key is the Name
of the prefenence. A PreferenceStore
is a generic dictionary of PreferenceStoreItem
s, where a PreferenceStoreItem
can be a Preference
, PreferenceGroup
, PreferenceStore
, an array of PreferenceGroup
, or an array of PreferenceStore
. This allows for a PreferenceGroup
to be used in plugin architechtures, such that a plugin developer could define a group in a structured way and understand the behaivor that group will be implemented to the user. Different groups could be provided for expected plugins to provide.
Usage
A basic PreferenceGroup
could be instantiated with:
using PreferenceGroups;
PreferenceGroup group = PreferenceGroupBuilder
.Create()
.AddInt32(name: "Number", b => b
.WithDefaultValue(13))
.AddString(name: "String", b => b
.WithDescription("A string prefence."))
.Build();
PreferenceFile file = new(path: "Preferences.jsonc",
indentChar: ' ', indentDepth: 2);
// Writes group to the file, overwriting it if exists.
file.Write(group);
// Updates group according to the contents of the file.
file.Update(group);
The contents of the Preferences.jsonc
file will be:
{
// Default value: 13.
"Number": null,
// A string prefence.
"String": null
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.0.10-alpha | 0 | 9/6/2025 |
0.0.9-alpha | 230 | 8/25/2025 |
0.0.8-alpha | 45 | 8/23/2025 |
0.0.7-alpha | 107 | 8/21/2025 |
0.0.6-alpha | 112 | 8/19/2025 |
0.0.5-alpha | 112 | 8/18/2025 |
0.0.4-alpha | 66 | 8/15/2025 |
0.0.3-alpha | 121 | 8/14/2025 |
0.0.2-alpha | 134 | 8/8/2025 |
0.0.1-alpha | 115 | 7/17/2025 |