Ejemplo n.º 1
0
        protected override DObject GetValue()
        {
            var lastVariable = Interpreter.current.evaluator.lastVariable;
            var result       = getter.Call(new DObject[0]);

            Interpreter.current.evaluator.lastVariable = lastVariable;
            return(result);
        }
Ejemplo n.º 2
0
        protected override DObject SetValue(DObject value)
        {
            if (setter == null)
            {
                throw Interpreter.current.Exception("Attempt to write to read-only variable");
            }

            return(setter.Call(new DObject[] { value }));
        }