Пример #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CategoryName?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ CertificationRequisitionId.GetHashCode();
         hashCode = (hashCode * 397) ^ ContentId.GetHashCode();
         hashCode = (hashCode * 397) ^ (Description?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ Id.GetHashCode();
         hashCode = (hashCode * 397) ^ (InternalCategoryName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (InternalSubcategoryName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ IsCertification.GetHashCode();
         hashCode = (hashCode * 397) ^ IsMythic.GetHashCode();
         hashCode = (hashCode * 397) ^ IsWearable.GetHashCode();
         hashCode = (hashCode * 397) ^ HideIfNotAcquired.GetHashCode();
         hashCode = (hashCode * 397) ^ (LargeImageUrl?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ LevelRequirement;
         hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Rarity?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)RarityType;
         hashCode = (hashCode * 397) ^ SellPrice;
         hashCode = (hashCode * 397) ^ (SubcategoryName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ SubcategoryOrder;
         hashCode = (hashCode * 397) ^ (SupportedGameModes?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)UseType;
         return(hashCode);
     }
 }
Пример #2
0
        public bool Equals(Requisition other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(string.Equals(CategoryName, other.CategoryName) &&
                   CertificationRequisitionId.Equals(other.CertificationRequisitionId) &&
                   ContentId.Equals(other.ContentId) &&
                   string.Equals(Description, other.Description) &&
                   Id.Equals(other.Id) &&
                   string.Equals(InternalCategoryName, other.InternalCategoryName) &&
                   string.Equals(InternalSubcategoryName, other.InternalSubcategoryName) &&
                   IsCertification == other.IsCertification &&
                   IsMythic == other.IsMythic &&
                   IsWearable == other.IsWearable &&
                   HideIfNotAcquired == other.HideIfNotAcquired &&
                   string.Equals(LargeImageUrl, other.LargeImageUrl) &&
                   LevelRequirement == other.LevelRequirement &&
                   string.Equals(Name, other.Name) &&
                   string.Equals(Rarity, other.Rarity) &&
                   RarityType == other.RarityType &&
                   SellPrice == other.SellPrice &&
                   string.Equals(SubcategoryName, other.SubcategoryName) &&
                   SubcategoryOrder == other.SubcategoryOrder &&
                   SupportedGameModes.OrderBy(sgm => sgm).SequenceEqual(other.SupportedGameModes.OrderBy(sgm => sgm)) &&
                   UseType == other.UseType);
        }