Sparkdo.Settings
1.0.2
dotnet add package Sparkdo.Settings --version 1.0.2
NuGet\Install-Package Sparkdo.Settings -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sparkdo.Settings" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sparkdo.Settings" Version="1.0.2" />
<PackageReference Include="Sparkdo.Settings" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Sparkdo.Settings --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sparkdo.Settings, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Sparkdo.Settings@1.0.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Sparkdo.Settings&version=1.0.2
#tool nuget:?package=Sparkdo.Settings&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Sparkdo.Settings
Sparkdo 设置管理库,提供设置定义、设置值提供者、设置存储等设置管理功能。
功能特性
- 设置定义管理
- 多种设置值提供者(默认值、配置文件、全局设置、用户设置等)
- 设置加密服务
- 本地化设置显示名称和描述
- 与 Sparkdo 框架无缝集成
安装
<PackageReference Include="Sparkdo.Settings" Version="x.x.x" />
核心组件
SettingDefinition
设置定义类,定义了设置的基本属性:
Name: 设置的唯一名称DisplayName: 显示名称Description: 描述DefaultValue: 默认值IsVisibleToClients: 是否对客户端可见Providers: 允许的提供程序列表IsInherited: 是否可继承IsEncrypted: 是否加密存储
ISettingDefinitionManager
设置定义管理器接口,用于管理设置定义:
GetAsync(): 获取指定名称的设置定义GetAllAsync(): 获取所有设置定义GetOrNullAsync(): 获取指定名称的设置定义,如果不存在则返回null
ISettingProvider
设置提供者接口,用于获取设置值:
GetOrNullAsync(): 获取指定名称的设置值GetAllAsync(): 获取所有设置值
ISettingStore
设置存储接口,用于持久化设置值:
- 可以实现自定义的设置存储逻辑
ISettingEncryptionService
设置加密服务接口,用于加密和解密设置值:
Encrypt(): 加密设置值Decrypt(): 解密设置值
扩展性
该库提供了完整的设置管理功能实现,可以通过以下方式扩展:
- 实现自定义的
ISettingDefinitionProvider来提供特定的设置定义 - 实现自定义的
ISettingValueProvider来提供特定的设置值 - 实现自定义的
ISettingStore来提供特定的设置存储逻辑 - 实现自定义的
ISettingEncryptionService来提供特定的加密逻辑
代码结构说明
本项目包含以下主要组件:
设置定义相关
SettingDefinition: 设置定义类ISettingDefinitionManager: 设置定义管理器接口DefaultSettingDefinitionManager: 默认设置定义管理器实现ISettingDefinitionProvider: 设置定义提供者接口SettingDefinitionProvider: 设置定义提供者基类ISettingDefinitionContext: 设置定义上下文接口SettingDefinitionContext: 设置定义上下文实现IStaticSettingDefinitionStore: 静态设置定义存储接口DefaultStaticSettingDefinitionStore: 默认静态设置定义存储实现IDynamicSettingDefinitionStore: 动态设置定义存储接口NullDynamicSettingDefinitionStore: 空动态设置定义存储实现
设置值相关
SettingValue: 设置值类ISettingProvider: 设置提供者接口DefaultSettingProvider: 默认设置提供者实现ISettingValueProvider: 设置值提供者接口ISettingValueProviderManager: 设置值提供者管理器接口DefaultSettingValueProviderManager: 默认设置值提供者管理器实现SettingValueProvider: 设置值提供者基类DefaultValueSettingValueProvider: 默认值设置值提供者实现ConfigurationSettingValueProvider: 配置文件设置值提供者实现GlobalSettingValueProvider: 全局设置值提供者实现UserSettingValueProvider: 用户设置值提供者实现
加密相关
ISettingEncryptionService: 设置加密服务接口SettingEncryptionService: 设置加密服务实现
配置
SparkdoSettingOptions: 设置配置选项SparkdoSettingsModule: 设置模块配置
所有公共接口和类都添加了详细的 XML 文档注释,便于开发者理解和使用。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- JetBrains.Annotations (>= 2025.2.4)
- Microsoft.Extensions.Configuration (>= 10.0.5)
- Microsoft.Extensions.Configuration.CommandLine (>= 10.0.5)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.5)
- Microsoft.Extensions.Configuration.FileExtensions (>= 10.0.5)
- Microsoft.Extensions.Configuration.Json (>= 10.0.5)
- Microsoft.Extensions.Configuration.UserSecrets (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
- Microsoft.Extensions.DependencyModel (>= 10.0.5)
- Microsoft.Extensions.FileProviders.Physical (>= 10.0.5)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Localization (>= 10.0.5)
- Microsoft.Extensions.Logging (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Options (>= 10.0.5)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.5)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.5)
- Nito.AsyncEx.Context (>= 5.1.2)
- Sparkdo.Localization.Abstractions (>= 1.0.2)
- Sparkdo.Security (>= 1.0.2)
- System.Linq.Dynamic.Core (>= 1.7.1)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Sparkdo.Settings:
| Package | Downloads |
|---|---|
|
Sparkdo.Localization
Sparkdo 本地化模块,提供完整的本地化功能实现 |
|
|
Sparkdo.Timing
Sparkdo 时序处理库,提供时钟、时区处理和时间相关的功能 |
|
|
Sparkdo.MultiTenancy
Sparkdo 框架的多租户实现。提供多租户功能的核心实现。 |
|
|
Sparkdo.Emailing
Sparkdo 邮件发送库,提供基于 SMTP 的邮件发送功能,支持同步/异步发送、后台队列发送和模板邮件 |
|
|
Sparkdo.SettingManagement.Domain
Sparkdo 设置管理领域库,提供设置管理功能的核心领域模型、仓储接口和业务逻辑实现 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.2 | 774 | 4/27/2026 |
| 1.0.2-preview.5 | 155 | 4/15/2026 |
| 1.0.2-preview.4 | 162 | 2/8/2026 |
| 1.0.2-preview.3 | 172 | 2/1/2026 |
| 1.0.2-preview.2 | 181 | 1/31/2026 |
| 1.0.2-preview.1 | 227 | 12/4/2025 |
| 1.0.1 | 2,755 | 11/27/2025 |
| 1.0.0 | 2,754 | 11/25/2025 |
| 1.0.0-preview.5 | 154 | 10/24/2025 |