示例#1
0
        public override async Task <List <SettingValue> > GetAllAsync(SettingDefinition[] settings)
        {
            if (CurrentUser.Id == null)
            {
                return(settings.Select(x => new SettingValue(x.Name, null)).ToList());
            }

            return(await SettingStore.GetAllAsync(settings.Select(x => x.Name).ToArray(), Name, CurrentUser.Id.ToString()));
        }
示例#2
0
        public override async Task <string> GetOrNullAsync(SettingDefinition setting)
        {
            if (CurrentUser.Id == null)
            {
                return(null);
            }

            return(await SettingStore.GetOrNullAsync(setting.Name, Name, CurrentUser.Id.ToString()));
        }
 public override Task <string> GetOrNullAsync(SettingDefinition setting)
 {
     return(SettingStore.GetOrNullAsync(setting.Name, Name, null));
 }
示例#4
0
 public override async Task <List <SettingValue> > GetAllAsync(SettingDefinition[] settings)
 {
     return(await SettingStore.GetAllAsync(settings.Select(x => x.Name).ToArray(), Name, CurrentTenant.Id?.ToString()));
 }
示例#5
0
 public override async Task <string> GetOrNullAsync(SettingDefinition setting)
 {
     return(await SettingStore.GetOrNullAsync(setting.Name, Name, CurrentTenant.Id?.ToString()));
 }
 public override Task ClearAsync(SettingDefinition setting, string providerKey)
 {
     return(SettingStore.DeleteAsync(setting.Name, Name, null));
 }
 public override Task SetAsync(SettingDefinition setting, string value, string providerKey)
 {
     return(SettingStore.SetAsync(setting.Name, value, Name, null));
 }
 public override Task <List <SettingValue> > GetAllAsync(SettingDefinition[] settings)
 {
     return(SettingStore.GetAllAsync(settings.Select(x => x.Name).ToArray(), Name, null));
 }