public Task SetAsync <T>(ISettingStoreContext context, T value) { var key = $"{context.Properties.Values.ExpandToString(":")}:{context.SettingDefinition.Name}"; _values[key] = value; return(Task.CompletedTask); }
public Task <SettingValue <T> > GetAsync <T>(ISettingStoreContext context) { var key = $"{context.Properties.Values.ExpandToString(":")}:{context.SettingDefinition.Name}"; var value = _values.GetOrDefault(key); if (value == null) { return(Task.FromResult <SettingValue <T> >(null)); } return(Task.FromResult(new SettingValue <T> { Definition = context.SettingDefinition, Value = (T)value })); }
/// <summary> /// /// </summary> /// <param name="context"></param> protected virtual void ConfigContext(ISettingStoreContext context) { }