static public int GetClass(IntPtr l) { try { string cls; checkType(l, 1, out cls); Type t = LuaObject.FindType(cls); if (t == null) { return(error(l, "Can't find {0} to create", cls)); } LuaClassObject co = new LuaClassObject(t); pushValue(l, true); LuaObject.pushObject(l, co); return(2); } catch (Exception e) { return(error(l, e)); } }
public static int ImportCSharpType(IntPtr l) { try { string cls; Helper.checkType(l, 1, out cls); Type t = LuaObject.FindType(cls); if (t == null) { return Helper.error(l, "Can't find {0} to create", cls); } LuaClassObject co = new LuaClassObject(t); LuaObject.pushObject(l,co); Helper.pushValue(l, true); return 2; } catch (Exception e) { return Helper.error(l, e); } }
public static int GetClass(IntPtr ptr) { try { string cls; CheckType(ptr, 1, out cls); Type t = LuaObject.FindType(cls); if (t == null) { return(Error(ptr, "Can't find {0} to create", cls)); } LuaClassObject co = new LuaClassObject(t); LuaObject.PushValue(ptr, true); LuaObject.PushObject(ptr, co); return(2); } catch (Exception e) { return(Error(ptr, e)); } }
static public int GetClass(IntPtr l) { try { string cls; checkType(l, 1, out cls); Type t = Type.GetType(cls); if (t == null) { LuaDLL.luaL_error(l, "Can't find {0} to create", cls); return(0); } LuaClassObject co = new LuaClassObject(t); LuaObject.pushObject(l, co); return(1); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
public static int GetClass(IntPtr l) { try { string cls; checkType(l, 1, out cls); Type t = Type.GetType(cls); if (t == null) { return error(l, "Can't find {0} to create", cls); } LuaClassObject co = new LuaClassObject(t); pushValue(l, true); LuaObject.pushObject(l,co); return 2; } catch (Exception e) { return error(l, e); } }
public static int GetClass(IntPtr l) { try { string cls; checkType(l, 1, out cls); Type t = Type.GetType(cls); if (t == null) { LuaDLL.luaL_error(l, "Can't find {0} to create", cls); return 0; } LuaClassObject co = new LuaClassObject(t); LuaObject.pushObject(l,co); return 1; } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return 0; } }