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 JetBrains.Annotations;
|
|
|
|
|
using Volo.Abp.Settings;
|
|
|
|
|
|
|
|
|
|
namespace NPin.Framework.SettingManagement.Domain.Provider.Extensions;
|
|
|
|
|
|
|
|
|
|
public static class DefaultValueSettingManagerExtensions
|
|
|
|
|
{
|
|
|
|
|
public static Task<string?> GetOrNullDefaultAsync(this ISettingManager settingManager, [NotNull] string name,
|
|
|
|
|
bool fallback = true)
|
|
|
|
|
{
|
|
|
|
|
return settingManager.GetOrNullAsync(name, DefaultValueSettingValueProvider.ProviderName, null, fallback);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Task<List<SettingValue>> GetAllDefaultAsync(this ISettingManager settingManager, bool fallback = true)
|
|
|
|
|
{
|
|
|
|
|
return settingManager.GetAllAsync(DefaultValueSettingValueProvider.ProviderName, null, fallback);
|
|
|
|
|
}
|
|
|
|
|
}
|