public bool DeepEquals(DestinyProfileComponent?other) { return(other is not null && (UserInfo is not null ? UserInfo.DeepEquals(other.UserInfo) : other.UserInfo is null) && DateLastPlayed == other.DateLastPlayed && VersionsOwned == other.VersionsOwned && CharacterIds.DeepEqualsListNaive(other.CharacterIds) && SeasonHashes.DeepEqualsListNaive(other.SeasonHashes) && CurrentSeasonHash == other.CurrentSeasonHash && CurrentSeasonRewardPowerCap == other.CurrentSeasonRewardPowerCap); }
public void Update(DestinyProfileComponent?other) { if (other is null) { return; } if (!UserInfo.DeepEquals(other.UserInfo)) { UserInfo.Update(other.UserInfo); OnPropertyChanged(nameof(UserInfo)); } if (DateLastPlayed != other.DateLastPlayed) { DateLastPlayed = other.DateLastPlayed; OnPropertyChanged(nameof(DateLastPlayed)); } if (VersionsOwned != other.VersionsOwned) { VersionsOwned = other.VersionsOwned; OnPropertyChanged(nameof(VersionsOwned)); } if (!CharacterIds.DeepEqualsListNaive(other.CharacterIds)) { CharacterIds = other.CharacterIds; OnPropertyChanged(nameof(CharacterIds)); } if (!SeasonHashes.DeepEqualsListNaive(other.SeasonHashes)) { SeasonHashes = other.SeasonHashes; OnPropertyChanged(nameof(SeasonHashes)); } if (CurrentSeasonHash != other.CurrentSeasonHash) { CurrentSeasonHash = other.CurrentSeasonHash; OnPropertyChanged(nameof(CurrentSeasonHash)); } if (CurrentSeasonRewardPowerCap != other.CurrentSeasonRewardPowerCap) { CurrentSeasonRewardPowerCap = other.CurrentSeasonRewardPowerCap; OnPropertyChanged(nameof(CurrentSeasonRewardPowerCap)); } }
public bool Equals(DestinyProfileComponent input) { if (input == null) { return(false); } return (( UserInfo == input.UserInfo || (UserInfo != null && UserInfo.Equals(input.UserInfo)) ) && ( DateLastPlayed == input.DateLastPlayed || (DateLastPlayed != null && DateLastPlayed.Equals(input.DateLastPlayed)) ) && ( VersionsOwned == input.VersionsOwned || (VersionsOwned != null && VersionsOwned.Equals(input.VersionsOwned)) ) && ( CharacterIds == input.CharacterIds || (CharacterIds != null && CharacterIds.SequenceEqual(input.CharacterIds)) ) && ( SeasonHashes == input.SeasonHashes || (SeasonHashes != null && SeasonHashes.SequenceEqual(input.SeasonHashes)) ) && ( CurrentSeasonHash == input.CurrentSeasonHash || (CurrentSeasonHash.Equals(input.CurrentSeasonHash)) ) && ( CurrentSeasonRewardPowerCap == input.CurrentSeasonRewardPowerCap || (CurrentSeasonRewardPowerCap.Equals(input.CurrentSeasonRewardPowerCap)) )); }