public void RegisterLuaClassType(Type klass, Type luaClass) { LuaClassType luaClassType = new LuaClassType(); luaClassType.klass = luaClass; GetReturnTypesFromClass(klass, out luaClassType.returnTypes); classCollection [klass] = luaClassType; }
/* * Gets an instance of an implementation of the klass interface or * subclass of klass that delegates public virtual methods to the * luaTable table. * Caches the generated type. */ public object GetClassInstance(Type klass, LuaTable luaTable) { LuaClassType luaClassType; if (classCollection.ContainsKey(klass)) { luaClassType = classCollection[klass]; } else { luaClassType = new LuaClassType(); GenerateClass(klass, out luaClassType.klass, out luaClassType.returnTypes); classCollection[klass] = luaClassType; } return(Activator.CreateInstance(luaClassType.klass, new object[] { luaTable, luaClassType.returnTypes })); }
public void RegisterLuaClassType(Type klass, Type luaClass) { LuaClassType luaClassType = new LuaClassType (); luaClassType.klass = luaClass; GetReturnTypesFromClass (klass, out luaClassType.returnTypes); classCollection [klass] = luaClassType; }
/* * Gets an instance of an implementation of the klass interface or * subclass of klass that delegates public virtual methods to the * luaTable table. * Caches the generated type. */ public object GetClassInstance(Type klass, LuaTable luaTable) { LuaClassType luaClassType; if (classCollection.ContainsKey (klass)) luaClassType = classCollection [klass]; else { luaClassType = new LuaClassType (); GenerateClass (klass, out luaClassType.klass, out luaClassType.returnTypes); classCollection [klass] = luaClassType; } return Activator.CreateInstance (luaClassType.klass, new object[] { luaTable, luaClassType.returnTypes }); }