Пример #1
0
 public bool DeepEquals(UserToUserContext?other)
 {
     return(other is not null &&
            IsFollowing == other.IsFollowing &&
            (IgnoreStatus is not null ? IgnoreStatus.DeepEquals(other.IgnoreStatus) : other.IgnoreStatus is null) &&
            GlobalIgnoreEndDate == other.GlobalIgnoreEndDate);
 }
Пример #2
0
 public bool DeepEquals(PostResponse?other)
 {
     return(other is not null &&
            LastReplyTimestamp == other.LastReplyTimestamp &&
            IsPinned == other.IsPinned &&
            UrlMediaType == other.UrlMediaType &&
            Thumbnail == other.Thumbnail &&
            Popularity == other.Popularity &&
            IsActive == other.IsActive &&
            IsAnnouncement == other.IsAnnouncement &&
            UserRating == other.UserRating &&
            UserHasRated == other.UserHasRated &&
            UserHasMutedPost == other.UserHasMutedPost &&
            LatestReplyPostId == other.LatestReplyPostId &&
            LatestReplyAuthorId == other.LatestReplyAuthorId &&
            (IgnoreStatus is not null ? IgnoreStatus.DeepEquals(other.IgnoreStatus) : other.IgnoreStatus is null) &&
            Locale == other.Locale);
 }
Пример #3
0
        public bool Equals(UserToUserContext input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     IsFollowing == input.IsFollowing ||
                     (IsFollowing != null && IsFollowing.Equals(input.IsFollowing))
                     ) &&
                 (
                     IgnoreStatus == input.IgnoreStatus ||
                     (IgnoreStatus != null && IgnoreStatus.Equals(input.IgnoreStatus))
                 ) &&
                 (
                     GlobalIgnoreEndDate == input.GlobalIgnoreEndDate ||
                     (GlobalIgnoreEndDate != null && GlobalIgnoreEndDate.Equals(input.GlobalIgnoreEndDate))
                 ));
        }
Пример #4
0
 public void Update(UserToUserContext?other)
 {
     if (other is null)
     {
         return;
     }
     if (IsFollowing != other.IsFollowing)
     {
         IsFollowing = other.IsFollowing;
         OnPropertyChanged(nameof(IsFollowing));
     }
     if (!IgnoreStatus.DeepEquals(other.IgnoreStatus))
     {
         IgnoreStatus.Update(other.IgnoreStatus);
         OnPropertyChanged(nameof(IgnoreStatus));
     }
     if (GlobalIgnoreEndDate != other.GlobalIgnoreEndDate)
     {
         GlobalIgnoreEndDate = other.GlobalIgnoreEndDate;
         OnPropertyChanged(nameof(GlobalIgnoreEndDate));
     }
 }
Пример #5
0
 public void Update(PostResponse?other)
 {
     if (other is null)
     {
         return;
     }
     if (LastReplyTimestamp != other.LastReplyTimestamp)
     {
         LastReplyTimestamp = other.LastReplyTimestamp;
         OnPropertyChanged(nameof(LastReplyTimestamp));
     }
     if (IsPinned != other.IsPinned)
     {
         IsPinned = other.IsPinned;
         OnPropertyChanged(nameof(IsPinned));
     }
     if (UrlMediaType != other.UrlMediaType)
     {
         UrlMediaType = other.UrlMediaType;
         OnPropertyChanged(nameof(UrlMediaType));
     }
     if (Thumbnail != other.Thumbnail)
     {
         Thumbnail = other.Thumbnail;
         OnPropertyChanged(nameof(Thumbnail));
     }
     if (Popularity != other.Popularity)
     {
         Popularity = other.Popularity;
         OnPropertyChanged(nameof(Popularity));
     }
     if (IsActive != other.IsActive)
     {
         IsActive = other.IsActive;
         OnPropertyChanged(nameof(IsActive));
     }
     if (IsAnnouncement != other.IsAnnouncement)
     {
         IsAnnouncement = other.IsAnnouncement;
         OnPropertyChanged(nameof(IsAnnouncement));
     }
     if (UserRating != other.UserRating)
     {
         UserRating = other.UserRating;
         OnPropertyChanged(nameof(UserRating));
     }
     if (UserHasRated != other.UserHasRated)
     {
         UserHasRated = other.UserHasRated;
         OnPropertyChanged(nameof(UserHasRated));
     }
     if (UserHasMutedPost != other.UserHasMutedPost)
     {
         UserHasMutedPost = other.UserHasMutedPost;
         OnPropertyChanged(nameof(UserHasMutedPost));
     }
     if (LatestReplyPostId != other.LatestReplyPostId)
     {
         LatestReplyPostId = other.LatestReplyPostId;
         OnPropertyChanged(nameof(LatestReplyPostId));
     }
     if (LatestReplyAuthorId != other.LatestReplyAuthorId)
     {
         LatestReplyAuthorId = other.LatestReplyAuthorId;
         OnPropertyChanged(nameof(LatestReplyAuthorId));
     }
     if (!IgnoreStatus.DeepEquals(other.IgnoreStatus))
     {
         IgnoreStatus.Update(other.IgnoreStatus);
         OnPropertyChanged(nameof(IgnoreStatus));
     }
     if (Locale != other.Locale)
     {
         Locale = other.Locale;
         OnPropertyChanged(nameof(Locale));
     }
 }
Пример #6
0
        public bool Equals(PostResponse input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     LastReplyTimestamp == input.LastReplyTimestamp ||
                     (LastReplyTimestamp != null && LastReplyTimestamp.Equals(input.LastReplyTimestamp))
                     ) &&
                 (
                     IsPinned == input.IsPinned ||
                     (IsPinned != null && IsPinned.Equals(input.IsPinned))
                 ) &&
                 (
                     UrlMediaType == input.UrlMediaType ||
                     (UrlMediaType != null && UrlMediaType.Equals(input.UrlMediaType))
                 ) &&
                 (
                     Thumbnail == input.Thumbnail ||
                     (Thumbnail != null && Thumbnail.Equals(input.Thumbnail))
                 ) &&
                 (
                     Popularity == input.Popularity ||
                     (Popularity != null && Popularity.Equals(input.Popularity))
                 ) &&
                 (
                     IsActive == input.IsActive ||
                     (IsActive != null && IsActive.Equals(input.IsActive))
                 ) &&
                 (
                     IsAnnouncement == input.IsAnnouncement ||
                     (IsAnnouncement != null && IsAnnouncement.Equals(input.IsAnnouncement))
                 ) &&
                 (
                     UserRating == input.UserRating ||
                     (UserRating.Equals(input.UserRating))
                 ) &&
                 (
                     UserHasRated == input.UserHasRated ||
                     (UserHasRated != null && UserHasRated.Equals(input.UserHasRated))
                 ) &&
                 (
                     UserHasMutedPost == input.UserHasMutedPost ||
                     (UserHasMutedPost != null && UserHasMutedPost.Equals(input.UserHasMutedPost))
                 ) &&
                 (
                     LatestReplyPostId == input.LatestReplyPostId ||
                     (LatestReplyPostId.Equals(input.LatestReplyPostId))
                 ) &&
                 (
                     LatestReplyAuthorId == input.LatestReplyAuthorId ||
                     (LatestReplyAuthorId.Equals(input.LatestReplyAuthorId))
                 ) &&
                 (
                     IgnoreStatus == input.IgnoreStatus ||
                     (IgnoreStatus != null && IgnoreStatus.Equals(input.IgnoreStatus))
                 ) &&
                 (
                     Locale == input.Locale ||
                     (Locale != null && Locale.Equals(input.Locale))
                 ));
        }