コード例 #1
0
 public bool DeepEquals(DestinyCharacterComponent?other)
 {
     return(other is not null &&
            MembershipId == other.MembershipId &&
            MembershipType == other.MembershipType &&
            CharacterId == other.CharacterId &&
            DateLastPlayed == other.DateLastPlayed &&
            MinutesPlayedThisSession == other.MinutesPlayedThisSession &&
            MinutesPlayedTotal == other.MinutesPlayedTotal &&
            Light == other.Light &&
            Stats.DeepEqualsDictionaryNaive(other.Stats) &&
            RaceHash == other.RaceHash &&
            GenderHash == other.GenderHash &&
            ClassHash == other.ClassHash &&
            RaceType == other.RaceType &&
            ClassType == other.ClassType &&
            GenderType == other.GenderType &&
            EmblemPath == other.EmblemPath &&
            EmblemBackgroundPath == other.EmblemBackgroundPath &&
            EmblemHash == other.EmblemHash &&
            (EmblemColor is not null ? EmblemColor.DeepEquals(other.EmblemColor) : other.EmblemColor is null) &&
            (LevelProgression is not null ? LevelProgression.DeepEquals(other.LevelProgression) : other.LevelProgression is null) &&
            BaseCharacterLevel == other.BaseCharacterLevel &&
            PercentToNextLevel == other.PercentToNextLevel &&
            TitleRecordHash == other.TitleRecordHash);
 }
コード例 #2
0
 public void Update(DestinyCharacterComponent?other)
 {
     if (other is null)
     {
         return;
     }
     if (MembershipId != other.MembershipId)
     {
         MembershipId = other.MembershipId;
         OnPropertyChanged(nameof(MembershipId));
     }
     if (MembershipType != other.MembershipType)
     {
         MembershipType = other.MembershipType;
         OnPropertyChanged(nameof(MembershipType));
     }
     if (CharacterId != other.CharacterId)
     {
         CharacterId = other.CharacterId;
         OnPropertyChanged(nameof(CharacterId));
     }
     if (DateLastPlayed != other.DateLastPlayed)
     {
         DateLastPlayed = other.DateLastPlayed;
         OnPropertyChanged(nameof(DateLastPlayed));
     }
     if (MinutesPlayedThisSession != other.MinutesPlayedThisSession)
     {
         MinutesPlayedThisSession = other.MinutesPlayedThisSession;
         OnPropertyChanged(nameof(MinutesPlayedThisSession));
     }
     if (MinutesPlayedTotal != other.MinutesPlayedTotal)
     {
         MinutesPlayedTotal = other.MinutesPlayedTotal;
         OnPropertyChanged(nameof(MinutesPlayedTotal));
     }
     if (Light != other.Light)
     {
         Light = other.Light;
         OnPropertyChanged(nameof(Light));
     }
     if (!Stats.DeepEqualsDictionaryNaive(other.Stats))
     {
         Stats = other.Stats;
         OnPropertyChanged(nameof(Stats));
     }
     if (RaceHash != other.RaceHash)
     {
         RaceHash = other.RaceHash;
         OnPropertyChanged(nameof(RaceHash));
     }
     if (GenderHash != other.GenderHash)
     {
         GenderHash = other.GenderHash;
         OnPropertyChanged(nameof(GenderHash));
     }
     if (ClassHash != other.ClassHash)
     {
         ClassHash = other.ClassHash;
         OnPropertyChanged(nameof(ClassHash));
     }
     if (RaceType != other.RaceType)
     {
         RaceType = other.RaceType;
         OnPropertyChanged(nameof(RaceType));
     }
     if (ClassType != other.ClassType)
     {
         ClassType = other.ClassType;
         OnPropertyChanged(nameof(ClassType));
     }
     if (GenderType != other.GenderType)
     {
         GenderType = other.GenderType;
         OnPropertyChanged(nameof(GenderType));
     }
     if (EmblemPath != other.EmblemPath)
     {
         EmblemPath = other.EmblemPath;
         OnPropertyChanged(nameof(EmblemPath));
     }
     if (EmblemBackgroundPath != other.EmblemBackgroundPath)
     {
         EmblemBackgroundPath = other.EmblemBackgroundPath;
         OnPropertyChanged(nameof(EmblemBackgroundPath));
     }
     if (EmblemHash != other.EmblemHash)
     {
         EmblemHash = other.EmblemHash;
         OnPropertyChanged(nameof(EmblemHash));
     }
     if (!EmblemColor.DeepEquals(other.EmblemColor))
     {
         EmblemColor.Update(other.EmblemColor);
         OnPropertyChanged(nameof(EmblemColor));
     }
     if (!LevelProgression.DeepEquals(other.LevelProgression))
     {
         LevelProgression.Update(other.LevelProgression);
         OnPropertyChanged(nameof(LevelProgression));
     }
     if (BaseCharacterLevel != other.BaseCharacterLevel)
     {
         BaseCharacterLevel = other.BaseCharacterLevel;
         OnPropertyChanged(nameof(BaseCharacterLevel));
     }
     if (PercentToNextLevel != other.PercentToNextLevel)
     {
         PercentToNextLevel = other.PercentToNextLevel;
         OnPropertyChanged(nameof(PercentToNextLevel));
     }
     if (TitleRecordHash != other.TitleRecordHash)
     {
         TitleRecordHash = other.TitleRecordHash;
         OnPropertyChanged(nameof(TitleRecordHash));
     }
 }
コード例 #3
0
        public bool Equals(DestinyCharacterComponent input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     MembershipId == input.MembershipId ||
                     (MembershipId.Equals(input.MembershipId))
                     ) &&
                 (
                     MembershipType == input.MembershipType ||
                     (MembershipType != null && MembershipType.Equals(input.MembershipType))
                 ) &&
                 (
                     CharacterId == input.CharacterId ||
                     (CharacterId.Equals(input.CharacterId))
                 ) &&
                 (
                     DateLastPlayed == input.DateLastPlayed ||
                     (DateLastPlayed != null && DateLastPlayed.Equals(input.DateLastPlayed))
                 ) &&
                 (
                     MinutesPlayedThisSession == input.MinutesPlayedThisSession ||
                     (MinutesPlayedThisSession.Equals(input.MinutesPlayedThisSession))
                 ) &&
                 (
                     MinutesPlayedTotal == input.MinutesPlayedTotal ||
                     (MinutesPlayedTotal.Equals(input.MinutesPlayedTotal))
                 ) &&
                 (
                     Light == input.Light ||
                     (Light.Equals(input.Light))
                 ) &&
                 (
                     Stats == input.Stats ||
                     (Stats != null && Stats.SequenceEqual(input.Stats))
                 ) &&
                 (
                     RaceHash == input.RaceHash ||
                     (RaceHash.Equals(input.RaceHash))
                 ) &&
                 (
                     GenderHash == input.GenderHash ||
                     (GenderHash.Equals(input.GenderHash))
                 ) &&
                 (
                     ClassHash == input.ClassHash ||
                     (ClassHash.Equals(input.ClassHash))
                 ) &&
                 (
                     RaceType == input.RaceType ||
                     (RaceType != null && RaceType.Equals(input.RaceType))
                 ) &&
                 (
                     ClassType == input.ClassType ||
                     (ClassType != null && ClassType.Equals(input.ClassType))
                 ) &&
                 (
                     GenderType == input.GenderType ||
                     (GenderType != null && GenderType.Equals(input.GenderType))
                 ) &&
                 (
                     EmblemPath == input.EmblemPath ||
                     (EmblemPath != null && EmblemPath.Equals(input.EmblemPath))
                 ) &&
                 (
                     EmblemBackgroundPath == input.EmblemBackgroundPath ||
                     (EmblemBackgroundPath != null && EmblemBackgroundPath.Equals(input.EmblemBackgroundPath))
                 ) &&
                 (
                     EmblemHash == input.EmblemHash ||
                     (EmblemHash.Equals(input.EmblemHash))
                 ) &&
                 (
                     EmblemColor == input.EmblemColor ||
                     (EmblemColor != null && EmblemColor.Equals(input.EmblemColor))
                 ) &&
                 (
                     LevelProgression == input.LevelProgression ||
                     (LevelProgression != null && LevelProgression.Equals(input.LevelProgression))
                 ) &&
                 (
                     BaseCharacterLevel == input.BaseCharacterLevel ||
                     (BaseCharacterLevel.Equals(input.BaseCharacterLevel))
                 ) &&
                 (
                     PercentToNextLevel == input.PercentToNextLevel ||
                     (PercentToNextLevel.Equals(input.PercentToNextLevel))
                 ) &&
                 (
                     TitleRecordHash == input.TitleRecordHash ||
                     (TitleRecordHash.Equals(input.TitleRecordHash))
                 ));
        }