Пример #1
0
 public virtual bool VariableExists(string name)
 {
     if (string.IsNullOrEmpty(name))
     {
         throw new ArgumentException("Variable name cannot be null or empty.", nameof(name));
     }
     return(CustomVariablesConfiguration.IsGlobalVariable(name) ? globalVariableMap.ContainsKey(name) : localVariableMap.ContainsKey(name));
 }
Пример #2
0
        /// <summary>
        /// Un-asigns avatar texture from a character with the provided ID.
        /// </summary>
        public void RemoveAvatarTextureFor(string characterId)
        {
            if (!charIdToAvatarPathMap.ContainsKey(characterId))
            {
                return;
            }

            charIdToAvatarPathMap.Remove(characterId);
            OnCharacterAvatarChanged?.Invoke(new CharacterAvatarChangedArgs(characterId, null));
        }
Пример #3
0
 /// <summary>
 /// Checks whether a variable with the provided name exists.
 /// </summary>
 public bool VariableExists(string name) => IsGlobalVariable(name) ? globalVariableMap.ContainsKey(name) : localVariableMap.ContainsKey(name);
Пример #4
0
 public bool VariableExists(string name) => CustomVariablesConfiguration.IsGlobalVariable(name) ? globalVariableMap.ContainsKey(name) : localVariableMap.ContainsKey(name);