/// <summary> /// Indicates whether the current object is equal to another object of the same type. /// </summary> /// <param name="other">An object to compare with this object.</param> /// <returns> /// <c>true</c> if the current object is equal to the other parameter; otherwise, <c>false</c>. /// </returns> public bool Equals(AttributeKey other) { return(other != null && FriendlyName.Equals(other.FriendlyName, StringComparison.Ordinal) && Name.Equals(other.Name, StringComparison.Ordinal) && NameFormat.Equals(other.NameFormat, StringComparison.Ordinal) && ValueType.Equals(other.ValueType, StringComparison.Ordinal) && OriginalIssuer.Equals(other.OriginalIssuer, StringComparison.Ordinal)); }
/// <summary> /// Indicates whether the current object is equal to another object of the same type. /// </summary> /// <param name="other">An object to compare with this object.</param> /// <returns> /// <c>true</c> if the current object is equal to the other parameter; otherwise, <c>false</c>. /// </returns> public bool Equals(AttributeKey other) { return(other != null && FriendlyName.Equals(other.FriendlyName) && Name.Equals(other.Name) && NameFormat.Equals(other.NameFormat) && ValueType.Equals(other.ValueType) && OriginalIssuer.Equals(other.OriginalIssuer)); }
public bool Equals(DestinyMilestoneDefinition input) { if (input == null) { return(false); } return (( DisplayProperties == input.DisplayProperties || (DisplayProperties != null && DisplayProperties.Equals(input.DisplayProperties)) ) && ( DisplayPreference == input.DisplayPreference || (DisplayPreference != null && DisplayPreference.Equals(input.DisplayPreference)) ) && ( Image == input.Image || (Image != null && Image.Equals(input.Image)) ) && ( MilestoneType == input.MilestoneType || (MilestoneType != null && MilestoneType.Equals(input.MilestoneType)) ) && ( Recruitable == input.Recruitable || (Recruitable != null && Recruitable.Equals(input.Recruitable)) ) && ( FriendlyName == input.FriendlyName || (FriendlyName != null && FriendlyName.Equals(input.FriendlyName)) ) && ( ShowInExplorer == input.ShowInExplorer || (ShowInExplorer != null && ShowInExplorer.Equals(input.ShowInExplorer)) ) && ( ShowInMilestones == input.ShowInMilestones || (ShowInMilestones != null && ShowInMilestones.Equals(input.ShowInMilestones)) ) && ( ExplorePrioritizesActivityImage == input.ExplorePrioritizesActivityImage || (ExplorePrioritizesActivityImage != null && ExplorePrioritizesActivityImage.Equals(input.ExplorePrioritizesActivityImage)) ) && ( HasPredictableDates == input.HasPredictableDates || (HasPredictableDates != null && HasPredictableDates.Equals(input.HasPredictableDates)) ) && ( Quests == input.Quests || (Quests != null && Quests.SequenceEqual(input.Quests)) ) && ( Rewards == input.Rewards || (Rewards != null && Rewards.SequenceEqual(input.Rewards)) ) && ( VendorsDisplayTitle == input.VendorsDisplayTitle || (VendorsDisplayTitle != null && VendorsDisplayTitle.Equals(input.VendorsDisplayTitle)) ) && ( Vendors == input.Vendors || (Vendors != null && Vendors.SequenceEqual(input.Vendors)) ) && ( Values == input.Values || (Values != null && Values.SequenceEqual(input.Values)) ) && ( IsInGameMilestone == input.IsInGameMilestone || (IsInGameMilestone != null && IsInGameMilestone.Equals(input.IsInGameMilestone)) ) && ( Activities == input.Activities || (Activities != null && Activities.SequenceEqual(input.Activities)) ) && ( DefaultOrder == input.DefaultOrder || (DefaultOrder.Equals(input.DefaultOrder)) ) && ( Hash == input.Hash || (Hash.Equals(input.Hash)) ) && ( Index == input.Index || (Index.Equals(input.Index)) ) && ( Redacted == input.Redacted || (Redacted != null && Redacted.Equals(input.Redacted)) )); }
public override Dictionary <string, object> ToUpdate(IMemoryCache memoryCache, out BaseModel updatedElement) { Dictionary <string, object> changes = new Dictionary <string, object>(); Space refInCache = null; if (Id != Guid.Empty) { refInCache = CacheHelper.GetSpaceFromCache(memoryCache, Id); if (refInCache != null) { if (Name != null && !Name.Equals(refInCache.Name)) { changes.Add("Name", Name); refInCache.Name = Name; } if (FriendlyName != null && !FriendlyName.Equals(refInCache.FriendlyName)) { changes.Add("FriendlyName", FriendlyName); refInCache.FriendlyName = FriendlyName; } if (Type != null && !Type.Equals(refInCache.Type)) { changes.Add("Type", Type); refInCache.Type = Type; } if (SubType != null && !SubType.Equals(refInCache.SubType)) { changes.Add("SubType", SubType); refInCache.SubType = SubType; } if (ParentSpaceId != Guid.Empty && !ParentSpaceId.Equals(refInCache.ParentSpaceId)) { changes.Add("ParentSpaceId", ParentSpaceId); refInCache.ParentSpaceId = ParentSpaceId; } if (Status != null && !Status.Equals(refInCache.Status)) { changes.Add("Status", Status); refInCache.Status = Status; } if (PropertiesHasChanged) { changes.Add("Properties", Properties); refInCache.Properties = Properties; } } else { refInCache = this; if (Name != null) { changes.Add("Name", Name); } if (FriendlyName != null) { changes.Add("FriendlyName", FriendlyName); } if (Type != null) { changes.Add("Type", Type); } if (ParentSpaceId != Guid.Empty) { changes.Add("ParentSpaceId", ParentSpaceId); } if (SubType != null) { changes.Add("SubType", SubType); } if (Status != null) { changes.Add("Status", Status); } if (PropertiesHasChanged) { changes.Add("Properties", Properties); } } } updatedElement = refInCache; return(changes); }
public bool Equals(DestinyActivityModeDefinition input) { if (input == null) { return(false); } return (( DisplayProperties == input.DisplayProperties || (DisplayProperties != null && DisplayProperties.Equals(input.DisplayProperties)) ) && ( PgcrImage == input.PgcrImage || (PgcrImage != null && PgcrImage.Equals(input.PgcrImage)) ) && ( ModeType == input.ModeType || (ModeType != null && ModeType.Equals(input.ModeType)) ) && ( ActivityModeCategory == input.ActivityModeCategory || (ActivityModeCategory != null && ActivityModeCategory.Equals(input.ActivityModeCategory)) ) && ( IsTeamBased == input.IsTeamBased || (IsTeamBased != null && IsTeamBased.Equals(input.IsTeamBased)) ) && ( IsAggregateMode == input.IsAggregateMode || (IsAggregateMode != null && IsAggregateMode.Equals(input.IsAggregateMode)) ) && ( ParentHashes == input.ParentHashes || (ParentHashes != null && ParentHashes.SequenceEqual(input.ParentHashes)) ) && ( FriendlyName == input.FriendlyName || (FriendlyName != null && FriendlyName.Equals(input.FriendlyName)) ) && ( ActivityModeMappings == input.ActivityModeMappings || (ActivityModeMappings != null && ActivityModeMappings.SequenceEqual(input.ActivityModeMappings)) ) && ( Display == input.Display || (Display != null && Display.Equals(input.Display)) ) && ( Order == input.Order || (Order.Equals(input.Order)) ) && ( Hash == input.Hash || (Hash.Equals(input.Hash)) ) && ( Index == input.Index || (Index.Equals(input.Index)) ) && ( Redacted == input.Redacted || (Redacted != null && Redacted.Equals(input.Redacted)) )); }