public T GetValueForOrGlobal <T>(ulong id, string key) { var d = GetFor(id); if (d.ContainsKey(key)) { return((T)d[key]); } else { return(globalPrefs.GetValue(key, default(T))); } }
public T GetValueOrGlobal <T>(string key) { if (ContainsKey(key)) { if (this[key] is JObject) { return((this[key] as JObject).ToObject <T>()); } return((T)this[key]); } else { return(globalPrefs.GetValue(key, default(T))); } }