mirror of https://github.com/abpframework/abp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
677 B
26 lines
677 B
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using Volo.Abp.DependencyInjection;
|
|
|
|
namespace Volo.Abp.Settings
|
|
{
|
|
public class TestSettingValueProvider : ISettingValueProvider, ITransientDependency
|
|
{
|
|
public const string ProviderName = "Test";
|
|
|
|
private readonly Dictionary<string, string> _values;
|
|
|
|
public string Name => ProviderName;
|
|
|
|
public TestSettingValueProvider()
|
|
{
|
|
_values = new Dictionary<string, string>();
|
|
}
|
|
|
|
public Task<string> GetOrNullAsync(SettingDefinition setting)
|
|
{
|
|
return Task.FromResult(_values.GetOrDefault(setting.Name));
|
|
}
|
|
}
|
|
}
|