Esempio n. 1
0
        static LuaObject CreateFileObject(Stream stream)
        {
            LuaObject obj = LuaObject.FromObject(new FileObject(stream));

            obj.Metatable = FileMetatable;

            return(obj);
        }
Esempio n. 2
0
        static LuaObject CreateFileObject(Stream stream, bool autoflush)
        {
            FileObject fobj = new FileObject(stream);

            fobj.writer.AutoFlush = autoflush;
            LuaObject obj = LuaObject.FromObject(fobj);

            obj.Metatable = FileMetatable;

            return(obj);
        }
Esempio n. 3
0
 public override bool TrySetMember(SetMemberBinder binder, object value)
 {
     if (value is LuaObject)
     {
         ctx.Set(binder.Name, value as LuaObject);
     }
     else
     {
         ctx.Set(binder.Name, LuaObject.FromObject(value));
     }
     return(true);
 }
Esempio n. 4
0
 public override bool TrySetMember(SetMemberBinder binder, object value)
 {
     Set(binder.Name, LuaObject.FromObject(value));
     return(true);
 }