public int SetRequestGamePlayerDelegate(ForumGuild.RequestGamePlayerDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[ForumCallback] SetRequestGamePlayerDelegate: " + message); Result result = message.GetResult(); ForumPlayerParameter player = null; IDictionary playerDic = message.GetDictionary("player"); if (null != playerDic) { player = new ForumPlayerParameter(playerDic); } if (null != callback) { callback(result, player); } }); return(handlerNum); }
public static void UpdateGamePlayer(ForumPlayerParameter forumPlayerParameter, UpdateGamePlayerDelegate callback) { Log.Debug("[ForumGuild] UpdateGamePlayer"); ForumGuildImpl.UpdateGamePlayer(forumPlayerParameter.ToJsonString(), callback); }