Esempio n. 1
0
        public static Table GetMetatable(IHasMetatable obj)
        {
            if (obj == null)
            {
                return(null);
            }

            return(obj.Metatable);
        }
Esempio n. 2
0
        public void SetTable( IHasMetatable table, Value key, Value value )
        {
            if( table == null )
                throw new ArgumentNullException( "table" );

            Value tVal;
            tVal.RefVal = table;
            tVal.NumVal = 0;

            SetTable( tVal, ref key, ref value );
        }
Esempio n. 3
0
        /// <summary>
        /// Performs a full table get, invoking the __index
        /// metamethod if appropriate.
        /// </summary>
        public Value GetTable( IHasMetatable table, Value key )
        {
            if( table == null )
                throw new ArgumentNullException( "table" );

            Value tVal;
            tVal.RefVal = table;
            tVal.NumVal = 0;

            return GetTable( tVal, ref key );
        }