using Volo.Abp.DependencyInjection; using Volo.Abp.Settings; namespace NPin.Framework.SettingManagement.Domain.Provider; public class DefaultValueSettingManagementProvider : ISettingManagementProvider, ISingletonDependency { public string Name => DefaultValueSettingValueProvider.ProviderName; public virtual Task GetOrNullAsync(SettingDefinition setting, string providerKey) { return Task.FromResult(setting.DefaultValue); } public Task SetAsync(SettingDefinition setting, string value, string providerKey) { throw new AbpException( $"Can not set default value of a setting. It is only possible while defining the setting in a {typeof(ISettingDefinitionProvider)} implementation."); } public Task ClearAsync(SettingDefinition setting, string providerKey) { throw new AbpException( $"Can not clear default value of a setting. It is only possible while defining the setting in a {typeof(ISettingDefinitionProvider)} implementation."); } }