using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Leit.FrameWork.Cache { public class DictionaryHelper { public static void DictionaryAddValue(Dictionary dic, string key, T value) { key = key.Replace(" ", ""); if (dic.ContainsKey(key)) { dic[key] = value; } else { dic.Add(key, value); } } public static bool DictionaryIsConrainKey(Dictionary dic, string key) { if (dic.ContainsKey(key)) { return true; } return false; } } }