public ObjectTranslator(LuaState interpreter,IntPtr luaState)
        {
            this.interpreter=interpreter;
            typeChecker=new CheckType(this);
            metaFunctions=new MetaFunctions(this);
            assemblies=new List<Assembly>();
            assemblies.Add(Assembly.GetExecutingAssembly());

            importTypeFunction = new LuaCSFunction(ObjectTranslator.importType);
            loadAssemblyFunction = new LuaCSFunction(ObjectTranslator.loadAssembly);
            registerTableFunction = new LuaCSFunction(ObjectTranslator.registerTable);
            unregisterTableFunction = new LuaCSFunction(ObjectTranslator.unregisterTable);
            getMethodSigFunction = new LuaCSFunction(ObjectTranslator.getMethodSignature);
            getConstructorSigFunction = new LuaCSFunction(ObjectTranslator.getConstructorSignature);

            ctypeFunction = new LuaCSFunction(ObjectTranslator.ctype);
            enumFromIntFunction = new LuaCSFunction(ObjectTranslator.enumFromInt);

            createLuaObjectList(luaState);
            createIndexingMetaFunction(luaState);
            createBaseClassMetatable(luaState);
            createClassMetatable(luaState);
            createFunctionMetatable(luaState);
            setGlobalFunctions(luaState);
        }
        public ObjectTranslator(Lua interpreter,IntPtr luaState)
        {
            this.interpreter=interpreter;
            typeChecker=new CheckType(this);
            metaFunctions=new MetaFunctions(this);
            objects=new ArrayList();
            assemblies=new ArrayList();

            importTypeFunction=new LuaCSFunction(this.importType);
            importType__indexFunction=new LuaCSFunction(this.importType__index);
            loadAssemblyFunction=new LuaCSFunction(this.loadAssembly);
            loadAssemblyFromFunction=new LuaCSFunction(this.loadAssemblyFrom);
            registerTableFunction=new LuaCSFunction(this.registerTable);
            unregisterTableFunction=new LuaCSFunction(this.unregisterTable);
            getMethodSigFunction=new LuaCSFunction(this.getMethodSignature);
            getConstructorSigFunction=new LuaCSFunction(this.getConstructorSignature);

            createLuaObjectList(luaState);
            createIndexingMetaFunction(luaState);
            createBaseClassMetatable(luaState);
            createClassMetatable(luaState);
            createFunctionMetatable(luaState);
            setGlobalFunctions(luaState);

            LuaDLL.lua_dostring(luaState, "load_assembly('mscorlib')");
        }
 public ObjectTranslator(Lua interpreter, IntPtr luaState)
 {
     this.interpreter = interpreter;
     this.typeChecker = new CheckType(this);
     this.metaFunctions = new MetaFunctions(this);
     this.assemblies = new List<Assembly>();
     this.importTypeFunction = new LuaCSFunction(this.importType);
     this.loadAssemblyFunction = new LuaCSFunction(this.loadAssembly);
     this.registerTableFunction = new LuaCSFunction(this.registerTable);
     this.unregisterTableFunction = new LuaCSFunction(this.unregisterTable);
     this.getMethodSigFunction = new LuaCSFunction(this.getMethodSignature);
     this.getConstructorSigFunction = new LuaCSFunction(this.getConstructorSignature);
     this.createLuaObjectList(luaState);
     this.createIndexingMetaFunction(luaState);
     this.createBaseClassMetatable(luaState);
     this.createClassMetatable(luaState);
     this.createFunctionMetatable(luaState);
     this.setGlobalFunctions(luaState);
 }
        public ObjectTranslator(Lua interpreter,KopiLua.Lua.lua_State luaState)
        {
            this.interpreter=interpreter;
            typeChecker=new CheckType(this);
            metaFunctions=new MetaFunctions(this);
            assemblies=new List<Assembly>();

            importTypeFunction=new KopiLua.Lua.lua_CFunction(this.importType);
            loadAssemblyFunction=new KopiLua.Lua.lua_CFunction(this.loadAssembly);
            registerTableFunction=new KopiLua.Lua.lua_CFunction(this.registerTable);
            unregisterTableFunction=new KopiLua.Lua.lua_CFunction(this.unregisterTable);
            getMethodSigFunction=new KopiLua.Lua.lua_CFunction(this.getMethodSignature);
            getConstructorSigFunction=new KopiLua.Lua.lua_CFunction(this.getConstructorSignature);

            createLuaObjectList(luaState);
            createIndexingMetaFunction(luaState);
            createBaseClassMetatable(luaState);
            createClassMetatable(luaState);
            createFunctionMetatable(luaState);
            setGlobalFunctions(luaState);
        }
Exemple #5
0
        public ObjectTranslator(LuaState interpreter, IntPtr luaState)
        {
            this.interpreter = interpreter;
            weakTableRef     = -1;
            typeChecker      = new CheckType(this);
            metaFunctions    = new MetaFunctions(this);
            assemblies       = new List <Assembly>();
            assemblies.Add(Assembly.GetExecutingAssembly());

            importTypeFunction      = new LuaCSFunction(importType);
            loadAssemblyFunction    = new LuaCSFunction(loadAssembly);
            unregisterTableFunction = new LuaCSFunction(unregisterTable);
            ctypeFunction           = new LuaCSFunction(ctype);
            enumFromIntFunction     = new LuaCSFunction(enumFromInt);

            createLuaObjectList(luaState);
            createIndexingMetaFunction(luaState);
            createBaseClassMetatable(luaState);
            createClassMetatable(luaState);
            createFunctionMetatable(luaState);
            setGlobalFunctions(luaState);
        }
 public ObjectTranslator(LuaState interpreter, IntPtr luaState)
 {
     this.interpreter   = interpreter;
     this.weakTableRef  = -1;
     this.typeChecker   = new CheckType(this);
     this.metaFunctions = new MetaFunctions(this);
     this.assemblies    = new List <Assembly>();
     this.assemblies.Add(Assembly.GetExecutingAssembly());
     this.importTypeFunction        = new LuaCSFunction(ObjectTranslator.importType);
     this.loadAssemblyFunction      = new LuaCSFunction(ObjectTranslator.loadAssembly);
     this.registerTableFunction     = new LuaCSFunction(ObjectTranslator.registerTable);
     this.unregisterTableFunction   = new LuaCSFunction(ObjectTranslator.unregisterTable);
     this.getMethodSigFunction      = new LuaCSFunction(ObjectTranslator.getMethodSignature);
     this.getConstructorSigFunction = new LuaCSFunction(ObjectTranslator.getConstructorSignature);
     this.ctypeFunction             = new LuaCSFunction(ObjectTranslator.ctype);
     this.enumFromIntFunction       = new LuaCSFunction(ObjectTranslator.enumFromInt);
     this.createLuaObjectList(luaState);
     this.createIndexingMetaFunction(luaState);
     this.createBaseClassMetatable(luaState);
     this.createClassMetatable(luaState);
     this.createFunctionMetatable(luaState);
     this.setGlobalFunctions(luaState);
 }
Exemple #7
0
        public ObjectTranslator(Lua interpreter, IntPtr luaState)
        {
            this.interpreter = interpreter;
            typeChecker      = new CheckType(this);
            metaFunctions    = new MetaFunctions(this);
            assemblies       = new List <Assembly>();

            importTypeFunction        = new LuaCSFunction(this.importType);
            loadAssemblyFunction      = new LuaCSFunction(this.loadAssembly);
            registerTableFunction     = new LuaCSFunction(this.registerTable);
            unregisterTableFunction   = new LuaCSFunction(this.unregisterTable);
            getMethodSigFunction      = new LuaCSFunction(this.getMethodSignature);
            getConstructorSigFunction = new LuaCSFunction(this.getConstructorSignature);

            ctypeFunction       = new LuaCSFunction(this.ctype);
            enumFromIntFunction = new LuaCSFunction(this.enumFromInt);

            createLuaObjectList(luaState);
            createIndexingMetaFunction(luaState);
            createBaseClassMetatable(luaState);
            createClassMetatable(luaState);
            createFunctionMetatable(luaState);
            setGlobalFunctions(luaState);
        }