mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-03 00:00:58 +08:00
20 lines
755 B
C#
20 lines
755 B
C#
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
using JetBrains.Annotations;
|
|||
|
|
using Volo.Abp.Settings;
|
|||
|
|
|
|||
|
|
namespace Yi.Framework.SettingManagement.Domain;
|
|||
|
|
|
|||
|
|
public static class ConfigurationValueSettingManagerExtensions
|
|||
|
|
{
|
|||
|
|
public static Task<string> GetOrNullConfigurationAsync(this ISettingManager settingManager, [NotNull] string name, bool fallback = true)
|
|||
|
|
{
|
|||
|
|
return settingManager.GetOrNullAsync(name, ConfigurationSettingValueProvider.ProviderName, null, fallback);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public static Task<List<SettingValue>> GetAllConfigurationAsync(this ISettingManager settingManager, bool fallback = true)
|
|||
|
|
{
|
|||
|
|
return settingManager.GetAllAsync(ConfigurationSettingValueProvider.ProviderName, null, fallback);
|
|||
|
|
}
|
|||
|
|
}
|