Exemple #1
0
        public object GetVariable(CodeContext context, SymbolId name)
        {
            IAttributesCollection variables = _variables;

            if (variables != null)
            {
                return(variables[name]);
            }
            else
            {
                object result;

                if (!_host.TryGetVariable(context.LanguageContext.Engine, name, out result))
                {
                    // TODO:
                    throw context.LanguageContext.MissingName(name);
                }

                return(result);
            }
        }
Exemple #2
0
 public bool TryGetVariable(IScriptEngine engine, SymbolId name, out object value)
 {
     return(_host.TryGetVariable(engine, name, out value));
 }