internal ChangeListType GetChanges(XboxSocialUser other)
        {
            ChangeListType changeType = ChangeListType.NoChange;

            if (!string.Equals(this.Gamertag, other.Gamertag, StringComparison.OrdinalIgnoreCase) ||
                !string.Equals(this.Gamerscore, other.Gamerscore, StringComparison.OrdinalIgnoreCase) ||
                !string.Equals(this.RealName, other.RealName, StringComparison.OrdinalIgnoreCase) ||
                !string.Equals(this.DisplayName, other.DisplayName, StringComparison.OrdinalIgnoreCase) ||
                !string.Equals(this.DisplayPicRaw, other.DisplayPicRaw, StringComparison.OrdinalIgnoreCase) ||
                this.UseAvatar != other.UseAvatar ||
                !Equals(this.PreferredColor, other.PreferredColor) ||
                !Equals(this.TitleHistory, other.TitleHistory))
            {
                changeType |= ChangeListType.ProfileChange;
            }

            if (this.IsFollowedByCaller != other.IsFollowedByCaller ||
                this.IsFollowingCaller != other.IsFollowingCaller ||
                this.IsFavorite != other.IsFavorite)
            {
                changeType |= ChangeListType.SocialRelationshipChange;
            }

            if (this.PresenceState != other.PresenceState ||
                (this.PresenceDetails != null && other.PresenceDetails != null && this.PresenceDetails.All(record => other.PresenceDetails.Contains(record))))
            {
                changeType |= ChangeListType.PresenceChange;
            }

            return(changeType);
        }
Exemple #2
0
        /// <summary>
        /// Create a new numbered changelist
        /// </summary>
        /// <param name="id"></param>
        /// <param name="pending"></param>
        public Changelist(int id, bool pending)
        {
            Id      = id;
            Pending = pending;

            Type = ChangeListType.None;

            Files = new List <FileMetaData>();
        }
Exemple #3
0
        /// <summary>
        /// Create a new pending changelist
        /// </summary>
        public Changelist()
        {
            Pending = true;
            Id      = -1;

            Type = ChangeListType.None;

            Files = new List <FileMetaData>();
        }