Пример #1
0
 public bool DeepEquals(DestinyCollectibleDefinition?other)
 {
     return(other is not null &&
            (DisplayProperties is not null ? DisplayProperties.DeepEquals(other.DisplayProperties) : other.DisplayProperties is null) &&
            Scope == other.Scope &&
            SourceString == other.SourceString &&
            SourceHash == other.SourceHash &&
            ItemHash == other.ItemHash &&
            (AcquisitionInfo is not null ? AcquisitionInfo.DeepEquals(other.AcquisitionInfo) : other.AcquisitionInfo is null) &&
            (StateInfo is not null ? StateInfo.DeepEquals(other.StateInfo) : other.StateInfo is null) &&
            (PresentationInfo is not null ? PresentationInfo.DeepEquals(other.PresentationInfo) : other.PresentationInfo is null) &&
            PresentationNodeType == other.PresentationNodeType &&
            TraitIds.DeepEqualsListNaive(other.TraitIds) &&
            TraitHashes.DeepEqualsListNaive(other.TraitHashes) &&
            ParentNodeHashes.DeepEqualsListNaive(other.ParentNodeHashes) &&
            Hash == other.Hash &&
            Index == other.Index &&
            Redacted == other.Redacted);
 }
 public bool DeepEquals(DestinyCollectibleDefinition other)
 {
     return(other != null &&
            AcquisitionInfo.DeepEquals(other.AcquisitionInfo) &&
            (PresentationInfo != null ? PresentationInfo.DeepEquals(other.PresentationInfo) : other.PresentationInfo == null) &&
            DisplayProperties.DeepEquals(other.DisplayProperties) &&
            Item.DeepEquals(other.Item) &&
            ParentNodes.DeepEqualsReadOnlyCollections(other.ParentNodes) &&
            PresentationNodeType == other.PresentationNodeType &&
            Scope == other.Scope &&
            SourceHash == other.SourceHash &&
            SourceString == other.SourceString &&
            StateInfo.DeepEquals(other.StateInfo) &&
            Traits.DeepEqualsReadOnlyCollections(other.Traits) &&
            TraitIds.DeepEqualsReadOnlySimpleCollection(other.TraitIds) &&
            Blacklisted == other.Blacklisted &&
            Hash == other.Hash &&
            Index == other.Index &&
            Redacted == other.Redacted);
 }
Пример #3
0
 public void Update(DestinyCollectibleDefinition?other)
 {
     if (other is null)
     {
         return;
     }
     if (!DisplayProperties.DeepEquals(other.DisplayProperties))
     {
         DisplayProperties.Update(other.DisplayProperties);
         OnPropertyChanged(nameof(DisplayProperties));
     }
     if (Scope != other.Scope)
     {
         Scope = other.Scope;
         OnPropertyChanged(nameof(Scope));
     }
     if (SourceString != other.SourceString)
     {
         SourceString = other.SourceString;
         OnPropertyChanged(nameof(SourceString));
     }
     if (SourceHash != other.SourceHash)
     {
         SourceHash = other.SourceHash;
         OnPropertyChanged(nameof(SourceHash));
     }
     if (ItemHash != other.ItemHash)
     {
         ItemHash = other.ItemHash;
         OnPropertyChanged(nameof(ItemHash));
     }
     if (!AcquisitionInfo.DeepEquals(other.AcquisitionInfo))
     {
         AcquisitionInfo.Update(other.AcquisitionInfo);
         OnPropertyChanged(nameof(AcquisitionInfo));
     }
     if (!StateInfo.DeepEquals(other.StateInfo))
     {
         StateInfo.Update(other.StateInfo);
         OnPropertyChanged(nameof(StateInfo));
     }
     if (!PresentationInfo.DeepEquals(other.PresentationInfo))
     {
         PresentationInfo.Update(other.PresentationInfo);
         OnPropertyChanged(nameof(PresentationInfo));
     }
     if (PresentationNodeType != other.PresentationNodeType)
     {
         PresentationNodeType = other.PresentationNodeType;
         OnPropertyChanged(nameof(PresentationNodeType));
     }
     if (!TraitIds.DeepEqualsListNaive(other.TraitIds))
     {
         TraitIds = other.TraitIds;
         OnPropertyChanged(nameof(TraitIds));
     }
     if (!TraitHashes.DeepEqualsListNaive(other.TraitHashes))
     {
         TraitHashes = other.TraitHashes;
         OnPropertyChanged(nameof(TraitHashes));
     }
     if (!ParentNodeHashes.DeepEqualsListNaive(other.ParentNodeHashes))
     {
         ParentNodeHashes = other.ParentNodeHashes;
         OnPropertyChanged(nameof(ParentNodeHashes));
     }
     if (Hash != other.Hash)
     {
         Hash = other.Hash;
         OnPropertyChanged(nameof(Hash));
     }
     if (Index != other.Index)
     {
         Index = other.Index;
         OnPropertyChanged(nameof(Index));
     }
     if (Redacted != other.Redacted)
     {
         Redacted = other.Redacted;
         OnPropertyChanged(nameof(Redacted));
     }
 }