Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }