Apq.Cfg.Database.DatabaseCfgSource.md 2.5 KB

Apq.Cfg.Database

DatabaseCfgSource Class

数据库配置源

internal sealed class DatabaseCfgSource : Apq.Cfg.Sources.IWritableCfgSource, Apq.Cfg.Sources.ICfgSource

Inheritance System.Object 🡒 DatabaseCfgSource

Implements Apq.Cfg.Sources.IWritableCfgSource, Apq.Cfg.Sources.ICfgSource

Constructors
DatabaseCfgSource(DatabaseOptions, int, bool) 初始化 DatabaseCfgSource 实例
Properties
IsPrimaryWriter 获取是否为主要写入源,用于标识当多个可写源存在时的主要写入目标
IsWriteable 获取是否可写,数据库支持通过 API 写入配置,因此始终为 true
Level 获取配置层级,数值越大优先级越高
Methods
ApplyChangesAsync(IReadOnlyDictionary<string,string>, CancellationToken) 应用配置更改到数据库
BuildSource() 构建 Microsoft.Extensions.Configuration 的内存配置源,从数据库加载数据
CreateProvider(string) 根据提供程序名称创建 SqlSugar 数据库提供程序