private void handleFetchProfile(string _reply) { AccountModel.AccountStatus status = new AccountModel.AccountStatus(); string profile = ""; ServiceUtility.HandleReply(_reply, status, (_data) => { profile = _data["profile"].Value; }); model.SaveProfile(status, profile); }
public void FetchProfile(string _accountID, Action _onFinish) { Dictionary <string, Any> param = new Dictionary <string, Any>(); param.Add("accountID", new Any(_accountID)); post("/account/profile/fetch", param, (_reply) => { handleFetchProfile(_reply); if (null != _onFinish) { _onFinish(); } }, (_error) => { AccountModel.AccountStatus status = new AccountModel.AccountStatus(); status.code = -1; status.message = _error; model.SaveProfile(status, null); }, null); }