Sharingan.Abstractions
1.0.4
dotnet add package Sharingan.Abstractions --version 1.0.4
NuGet\Install-Package Sharingan.Abstractions -Version 1.0.4
<PackageReference Include="Sharingan.Abstractions" Version="1.0.4" />
<PackageVersion Include="Sharingan.Abstractions" Version="1.0.4" />
<PackageReference Include="Sharingan.Abstractions" />
paket add Sharingan.Abstractions --version 1.0.4
#r "nuget: Sharingan.Abstractions, 1.0.4"
#:package Sharingan.Abstractions@1.0.4
#addin nuget:?package=Sharingan.Abstractions&version=1.0.4
#tool nuget:?package=Sharingan.Abstractions&version=1.0.4
Sharingan
Cross-Platform Local Settings Library for .NET
A robust, multi-process-safe, async-first settings library for managing application, user, and device settings locally.
✨ Features
- 🌍 Cross-Platform — Works on Windows, Linux, macOS, Android, and iOS
- 🔒 Multi-Process Safe — File locking and atomic writes prevent data corruption
- ⚡ Async-First — Full async/await support with CancellationToken
- 🔌 11 Pluggable Providers — JSON, Registry, INI, YAML, XML, TOML, SQLite, and more
- 🏗️ Composite Configuration — Chain multiple providers with priority-based resolution
- 🔐 Encryption Support — AES-256-GCM and DPAPI for sensitive settings
- 📦 Lightweight — Minimal dependencies, optimized for performance
- 🎯 Multi-Target — Supports .NET Framework 4.8+, .NET Standard 2.0+, and .NET 7-10
- 🔔 Change Notifications — Event-driven updates when settings change
- 💪 Strongly-Typed — Full generic support with type-safe access
- 🔗 DI Integration — Microsoft.Extensions.DependencyInjection support
- 🌐 Configuration Bridge — Works with Microsoft.Extensions.Configuration
📦 Installation
Core Package
dotnet add package Sharingan
Provider Packages
# Windows Registry support
dotnet add package Sharingan.Providers.Registry
# INI file support
dotnet add package Sharingan.Providers.Ini
# YAML file support
dotnet add package Sharingan.Providers.Yaml
# XML file support
dotnet add package Sharingan.Providers.Xml
# TOML file support
dotnet add package Sharingan.Providers.Toml
# SQLite database support
dotnet add package Sharingan.Providers.SQLite
# Encryption support
dotnet add package Sharingan.Providers.Encrypted
Extension Packages
# Dependency Injection integration
dotnet add package Sharingan.Extensions.DependencyInjection
# Microsoft.Extensions.Configuration bridge
dotnet add package Sharingan.Extensions.Configuration
🚀 Quick Start
Basic Usage
using Sharingan;
// Store settings
Settings.Default.Set("app.theme", "Dark");
Settings.Default.Set("app.fontSize", 14);
Settings.Default.Set("app.autoSave", true);
// Retrieve settings with type-safe access
string theme = Settings.Default.GetString("app.theme");
int fontSize = Settings.Default.GetInt("app.fontSize");
bool autoSave = Settings.Default.GetBool("app.autoSave");
// Or use generic Get<T>
var config = Settings.Default.Get<AppConfig>("app.config", new AppConfig());
Using the Builder Pattern
using Sharingan;
using Sharingan.Providers;
ISettingsStore settings = new SharinganBuilder()
.WithApplicationName("MyApp")
.WithOrganizationName("MyCompany")
.UseEnvironmentVariables("MYAPP_", priority: 100) // Highest priority
.UseJsonFile("settings.json", SettingsScope.User, priority: 50)
.UseInMemory(priority: 10) // Fallback
.Build();
// Environment variables override JSON file settings
settings.Set("database.host", "localhost");
string host = settings.GetString("database.host");
Dependency Injection
using Sharingan.Extensions.DependencyInjection;
services.AddSharingan(builder => builder
.WithApplicationName("MyApp")
.UseJsonFile("settings.json")
);
// Inject anywhere
public class MyService(ISettingsStore settings)
{
public string GetTheme() => settings.GetString("theme", "Light");
}
🔧 Providers
| Provider | Package | Description | Cross-Platform |
|---|---|---|---|
| JSON | Sharingan |
Default file-based storage | ✅ |
| InMemory | Sharingan |
Session-scoped, non-persistent | ✅ |
| Environment | Sharingan |
Read-only environment variables | ✅ |
| Composite | Sharingan |
Chain multiple providers | ✅ |
| Registry | .Providers.Registry |
Windows Registry storage | ❌ Windows |
| INI | .Providers.Ini |
INI file format | ✅ |
| YAML | .Providers.Yaml |
YAML file format | ✅ |
| XML | .Providers.Xml |
XML file format | ✅ |
| TOML | .Providers.Toml |
TOML file format | ✅ |
| SQLite | .Providers.SQLite |
Database storage | ✅ |
| Encrypted | .Providers.Encrypted |
Encryption wrapper | ✅ |
🎯 Target Frameworks
| Framework | Supported |
|---|---|
| .NET Framework 4.8 | ✅ |
| .NET Framework 4.8.1 | ✅ |
| .NET Standard 2.0 | ✅ |
| .NET Standard 2.1 | ✅ |
| .NET 7.0 | ✅ |
| .NET 8.0 | ✅ |
| .NET 9.0 | ✅ |
| .NET 10.0 | ✅ |
🌐 Supported Platforms
| Platform | Supported | Notes |
|---|---|---|
| Windows | ✅ | Full support including Registry provider |
| Linux | ✅ | Full support via file-based providers |
| macOS | ✅ | Full support via file-based providers |
| Android | ✅ | Via .NET Standard / MAUI, uses internal app storage |
| iOS | ✅ | Via .NET Standard / MAUI, uses app sandbox Library folder |
📄 License
This project is licensed under the MIT License.
🔗 Links
| 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 is compatible. 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 is compatible. 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 is compatible. 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 is compatible. 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 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 is compatible. |
| 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. |
-
.NETFramework 4.8
- No dependencies.
-
.NETFramework 4.8.1
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net10.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Sharingan.Abstractions:
| Package | Downloads |
|---|---|
|
Sharingan
Sharingan is a robust, async-first local settings library for .NET applications. Features include multi-process safety with file locking, pluggable storage providers (JSON, InMemory, Environment, Composite), change notifications, and support for application, user, and device-level settings. Works across Windows, Linux, macOS, Android, and iOS. |
GitHub repositories
This package is not used by any popular GitHub repositories.