You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.3 KiB
C#

using JetBrains.Annotations;
using Volo.Abp.Settings;
namespace NPin.Framework.SettingManagement.Domain.Provider;
public interface ISettingManagementProvider
{
string Name { get; }
/// <summary>
/// 获取配置项
/// </summary>
/// <param name="setting"></param>
/// <param name="providerKey"></param>
/// <returns></returns>
Task<string?> GetOrNullAsync(SettingDefinition setting, string? providerKey);
/// <summary>
/// 通过前缀获取配置列表
/// </summary>
/// <param name="prefix"></param>
/// <param name="providerKey"></param>
/// <returns></returns>
Task<List<SettingValue>> GetByPrefixAsync(string prefix, string? providerKey);
/// <summary>
/// 设置配置数据
/// </summary>
/// <param name="setting"></param>
/// <param name="value"></param>
/// <param name="providerKey"></param>
/// <returns></returns>
Task SetAsync(SettingDefinition setting, string value, string? providerKey);
/// <summary>
/// 清除配置项
/// </summary>
/// <param name="setting"></param>
/// <param name="providerKey"></param>
/// <returns></returns>
Task ClearAsync(SettingDefinition setting, string? providerKey);
}