private static void AddDictionaryVariableItem(string dictionaryName, string userId, string value = null) { DictionaryVariable dictionary = dictionaryVariables[dictionaryName]; value = value == null ? "" : value; dictionary.items.TryAdd(userId, value); DBManager.InsertDictionaryEntry(dictionaryName, userId, value); }
public static bool DoesDictionaryVariableUserExist(string dictionaryName, string userId) { if (!dictionaryVariables.ContainsKey(dictionaryName)) { return(false); } DictionaryVariable dictionary = dictionaryVariables[dictionaryName]; if (!dictionary.items.ContainsKey(userId)) { return(false); } return(true); }