Example #1
0
 public bool TryUpdate(string name, object value)
 {
     if (name == _name)
     {
         _value = value;
         return(true);
     }
     else
     {
         return((_subStack != null) && _subStack.TryUpdate(name, value));
     }
 }
Example #2
0
        public bool TryUpdate(string name, object value)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }
            if (name == string.Empty)
            {
                throw new ArgumentException("arg must contain a value", nameof(name));
            }

            return(_stack == null ? false : _stack.TryUpdate(name, value));
        }