protected bool PreferGetBool(string key, string trueValue = "true", bool defaultValue = true) { if (Prefer == null || !Prefer.ContainsKey(key)) { return(defaultValue); } return(Prefer[key].Equals(trueValue, StringComparison.InvariantCultureIgnoreCase)); }
protected string PreferGet(string key, string defaultValue = null) { if (Prefer == null || !Prefer.ContainsKey(key)) { return(defaultValue); } return(Prefer[key]); }
protected void PreferSet(string key, string value) { if (Prefer == null) { Prefer = new Dictionary <string, string>(); } if (!Prefer.ContainsKey(key)) { Prefer.Add(key, value); } else { Prefer[key] = value; } }