static int RemoveObserver(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); Observers.Facade obj = (Observers.Facade)ToLua.CheckObject(L, 1, typeof(Observers.Facade)); string arg0 = ToLua.CheckString(L, 2); System.Func <Observers.Interfaces.INotification, bool> arg1 = null; LuaTypes funcType3 = LuaDLL.lua_type(L, 3); if (funcType3 != LuaTypes.LUA_TFUNCTION) { arg1 = (System.Func <Observers.Interfaces.INotification, bool>)ToLua.CheckObject(L, 3, typeof(System.Func <Observers.Interfaces.INotification, bool>)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 3); arg1 = DelegateFactory.CreateDelegate(typeof(System.Func <Observers.Interfaces.INotification, bool>), func) as System.Func <Observers.Interfaces.INotification, bool>; } obj.RemoveObserver(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }