/// <summary>
        ///     Updates lobby member info for a given member of the lobby.
        /// </summary>
        /// <param name="lobbyId"></param>
        /// <param name="userId"></param>
        /// <param name="transaction"></param>
        /// <param name="callback"></param>
        public void UpdateMember(long lobbyId, long userId, LobbyMemberTransaction transaction,
                                 UpdateMemberHandler callback)
        {
            GCHandle wrapped = GCHandle.Alloc(callback);

            Methods.UpdateMember(methodsPtr, lobbyId, userId, transaction.MethodsPtr, GCHandle.ToIntPtr(wrapped),
                                 UpdateMemberCallbackImpl);
            transaction.MethodsPtr = IntPtr.Zero;
        }
        /// <summary>
        ///     Gets a new member transaction for a lobby member in a given lobby.
        /// </summary>
        /// <param name="lobbyId"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        /// <exception cref="ResultException"></exception>
        public LobbyMemberTransaction GetMemberUpdateTransaction(long lobbyId, long userId)
        {
            LobbyMemberTransaction ret = new LobbyMemberTransaction();
            Result res = Methods.GetMemberUpdateTransaction(methodsPtr, lobbyId, userId, ref ret.MethodsPtr);

            if (res != Result.Ok)
            {
                throw new ResultException(res);
            }

            return(ret);
        }