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.
|
|
|
|
using NPin.Framework.SettingManagement.Domain;
|
|
|
|
|
using Volo.Abp.Settings;
|
|
|
|
|
|
|
|
|
|
namespace NPin.Framework.Upms.Domain.Settings;
|
|
|
|
|
|
|
|
|
|
public static class UpmsSettingManagerExtensions
|
|
|
|
|
{
|
|
|
|
|
public static Task<string?> GetOrNullUpmsAsync(this ISettingManager settingManager, string name,
|
|
|
|
|
bool fallback = true)
|
|
|
|
|
{
|
|
|
|
|
return settingManager.GetOrNullAsync(name, UpmsSettingManagementProvider.ProviderName, null, fallback);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Task<List<SettingValue>> GetAllUpmsAsync(this ISettingManager settingManager, bool fallback = true)
|
|
|
|
|
{
|
|
|
|
|
return settingManager.GetAllAsync(UpmsSettingManagementProvider.ProviderName, null, fallback);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Task SetUpmsAsync(this ISettingManager settingManager, string name, string value)
|
|
|
|
|
{
|
|
|
|
|
return settingManager.SetAsync(name, value, UpmsSettingManagementProvider.ProviderName, null);
|
|
|
|
|
}
|
|
|
|
|
}
|