Exemplo n.º 1
0
        public void UpdateVariable(string name, object value)
        {
            if (_depth == 0)
            {
                throw new MergeException("Invalid request - Scope chain has 0 links");
            }

            _links.UpdateVariable(name, value);
        }
Exemplo n.º 2
0
        public void UpdateVariable(string name, object value)
        {
            if (_variables.TryUpdate(name, value))
            {
                return;
            }

            if (_children != null)
            {
                _children.UpdateVariable(name, value);
            }
            else
            {
                throw new MergeException($"attempted variable re-assignment for undeclared variable: {name}");
            }
        }