using JetBrains.Annotations; using Volo.Abp.Settings; namespace NPin.Framework.SettingManagement.Domain.Provider.Extensions; public static class GlobalSettingManagerExtensions { public static Task GetOrNullGlobalAsync(this ISettingManager settingManager, [NotNull] string name, bool fallback = true) { return settingManager.GetOrNullAsync(name, GlobalSettingValueProvider.ProviderName, null, fallback); } public static Task> GetAllGlobalAsync(this ISettingManager settingManager, bool fallback = true) { return settingManager.GetAllAsync(GlobalSettingValueProvider.ProviderName, null, fallback); } public static Task SetGlobalAsync(this ISettingManager settingManager, [NotNull] string name, string? value) { return settingManager.SetAsync(name, value, GlobalSettingValueProvider.ProviderName, null); } }