private void CurrentUserInfoRequestCompleted(MNWSInfoRequestCurrentUserInfo.RequestResult result) { if (!result.HadError) { currentUserInfoExt = result.DataEntry; MNImageLoader.GetInstance().Load(currentUserInfoExt.UserAvatarUrl, OnImageLoaded); } else { MNTools.DLog(result.ErrorMessage); } }
public static Hashtable MNWSCurrentUserInfoToDictionary(MNWSCurrentUserInfo srcObject) { Hashtable result = new Hashtable(10); result["UserAvatarExists"] = srcObject.UserAvatarExists; result["UserAvatarHasCustomImg"] = srcObject.UserAvatarHasCustomImg; result["UserAvatarHasExternalUrl"] = srcObject.UserAvatarHasExternalUrl; result["UserAvatarUrl"] = srcObject.UserAvatarUrl; result["UserEmail"] = srcObject.UserEmail; result["UserGamePoints"] = srcObject.UserGamePoints; result["UserId"] = srcObject.UserId; result["UserNickName"] = srcObject.UserNickName; result["UserOnlineNow"] = srcObject.UserOnlineNow; result["UserStatus"] = srcObject.UserStatus; return result; }
public static MNWSCurrentUserInfo MNWSCurrentUserInfoFromDictionary(IDictionary deserializedObject) { if (deserializedObject == null) { return null; } MNWSCurrentUserInfo typedResult = new MNWSCurrentUserInfo(); typedResult.UserAvatarExists = ((deserializedObject["UserAvatarExists"] == null) ? null : (bool?)Convert.ToBoolean(deserializedObject["UserAvatarExists"])); typedResult.UserAvatarHasCustomImg = ((deserializedObject["UserAvatarHasCustomImg"] == null) ? null : (bool?)Convert.ToBoolean(deserializedObject["UserAvatarHasCustomImg"])); typedResult.UserAvatarHasExternalUrl = ((deserializedObject["UserAvatarHasExternalUrl"] == null) ? null : (bool?)Convert.ToBoolean(deserializedObject["UserAvatarHasExternalUrl"])); typedResult.UserAvatarUrl = (string)deserializedObject["UserAvatarUrl"]; typedResult.UserEmail = (string)deserializedObject["UserEmail"]; typedResult.UserGamePoints = ((deserializedObject["UserGamePoints"] == null) ? null : (int?)Convert.ToInt32(deserializedObject["UserGamePoints"])); typedResult.UserId = ((deserializedObject["UserId"] == null) ? null : (long?)Convert.ToInt64(deserializedObject["UserId"])); typedResult.UserNickName = (string)deserializedObject["UserNickName"]; typedResult.UserOnlineNow = ((deserializedObject["UserOnlineNow"] == null) ? null : (bool?)Convert.ToBoolean(deserializedObject["UserOnlineNow"])); typedResult.UserStatus = ((deserializedObject["UserStatus"] == null) ? null : (int?)Convert.ToInt32(deserializedObject["UserStatus"])); return typedResult; }