Exemplo n.º 1
0
        private dynamic GetMember(string name)
        {
            IodineObject obj = null;

            if (Context.Globals.ContainsKey(name))
            {
                obj = Context.Globals [name];
            }
            return(IodineDynamicObject.Create(obj, Context.VirtualMachine, typeRegistry));
        }
Exemplo n.º 2
0
        public dynamic Call(IodineObject obj, params object[] args)
        {
            IodineObject[] arguments = new IodineObject[args.Length];
            for (int i = 0; i < args.Length; i++)
            {
                arguments [i] = typeRegistry.ConvertToIodineObject(args [i]);
            }
            IodineObject ret = Context.Invoke(obj, arguments);

            return(IodineDynamicObject.Create(ret, Context.VirtualMachine, typeRegistry));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Returns an item in this Iodine instance's global dictionary
        /// </summary>
        /// <param name="name">Name.</param>
        public dynamic Get(string name)
        {
            IodineObject ret = module.GetAttribute(name);

            return(IodineDynamicObject.Create(ret, Context.VirtualMachine, typeRegistry));
        }