internal XboxSocialUser(IntPtr xboxSocialUserPtr) { XBOX_SOCIAL_USER cXboxSocialUser = Marshal.PtrToStructure <XBOX_SOCIAL_USER>(xboxSocialUserPtr); XboxUserId = MarshalingHelpers.Utf8ToString(cXboxSocialUser.XboxUserId); DisplayName = MarshalingHelpers.Utf8ToString(cXboxSocialUser.DisplayName); RealName = MarshalingHelpers.Utf8ToString(cXboxSocialUser.RealName); DisplayPicRaw = MarshalingHelpers.Utf8ToString(cXboxSocialUser.DisplayPicUrlRaw); UseAvatar = cXboxSocialUser.UseAvatar; Gamertag = MarshalingHelpers.Utf8ToString(cXboxSocialUser.Gamertag); Gamerscore = MarshalingHelpers.Utf8ToString(cXboxSocialUser.Gamerscore); PreferredColor = new PreferredColor(cXboxSocialUser.PreferredColor); IsFollowedByCaller = cXboxSocialUser.IsFollowedByCaller; IsFollowingUser = cXboxSocialUser.IsFollowingUser; IsFavorite = cXboxSocialUser.IsFavorite; PresenceRecord = new SocialManagerPresenceRecord(cXboxSocialUser.PresenceRecord); TitleHistory = new TitleHistory(cXboxSocialUser.TitleHistory); }
public bool Equals(SocialManagerPresenceRecord other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } bool listsAreEqual = PresenceTitleRecords.Count == other.PresenceTitleRecords.Count; for (int i = 0; i < PresenceTitleRecords.Count && listsAreEqual; i++) { listsAreEqual = listsAreEqual && PresenceTitleRecords[i].Equals(other.PresenceTitleRecords[i]); } return(listsAreEqual && this.UserState == other.UserState); }