Sparkdo.Settings 1.0.1

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Sparkdo.Settings --version 1.0.1
                    
NuGet\Install-Package Sparkdo.Settings -Version 1.0.1
                    
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.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sparkdo.Settings" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Sparkdo.Settings" />
                    
Project file
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.1
                    
#r "nuget: Sparkdo.Settings, 1.0.1"
                    
#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.1
                    
#: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.1
                    
Install as a Cake Addin
#tool nuget:?package=Sparkdo.Settings&version=1.0.1
                    
Install as a Cake Tool

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(): 解密设置值

扩展性

该库提供了完整的设置管理功能实现,可以通过以下方式扩展:

  1. 实现自定义的 ISettingDefinitionProvider 来提供特定的设置定义
  2. 实现自定义的 ISettingValueProvider 来提供特定的设置值
  3. 实现自定义的 ISettingStore 来提供特定的设置存储逻辑
  4. 实现自定义的 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 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 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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-preview.1 190 12/4/2025
1.0.1 2,697 11/27/2025
1.0.0 2,724 11/25/2025
1.0.0-preview.5 119 10/24/2025