コード例 #1
0
 public void Update(DestinyHistoricalStatsValue?other)
 {
     if (other is null)
     {
         return;
     }
     if (StatId != other.StatId)
     {
         StatId = other.StatId;
         OnPropertyChanged(nameof(StatId));
     }
     if (!Basic.DeepEquals(other.Basic))
     {
         Basic.Update(other.Basic);
         OnPropertyChanged(nameof(Basic));
     }
     if (!Pga.DeepEquals(other.Pga))
     {
         Pga.Update(other.Pga);
         OnPropertyChanged(nameof(Pga));
     }
     if (!Weighted.DeepEquals(other.Weighted))
     {
         Weighted.Update(other.Weighted);
         OnPropertyChanged(nameof(Weighted));
     }
     if (ActivityId != other.ActivityId)
     {
         ActivityId = other.ActivityId;
         OnPropertyChanged(nameof(ActivityId));
     }
 }
コード例 #2
0
 public bool DeepEquals(DestinyHistoricalStatsValue?other)
 {
     return(other is not null &&
            StatId == other.StatId &&
            (Basic is not null ? Basic.DeepEquals(other.Basic) : other.Basic is null) &&
            (Pga is not null ? Pga.DeepEquals(other.Pga) : other.Pga is null) &&
            (Weighted is not null ? Weighted.DeepEquals(other.Weighted) : other.Weighted is null) &&
            ActivityId == other.ActivityId);
 }