Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = ContentId.GetHashCode();
         hashCode = (hashCode * 397) ^ CreditPrice;
         hashCode = (hashCode * 397) ^ (Description?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ Flair.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)GiftableAcquisitionMethod;
         hashCode = (hashCode * 397) ^ Id.GetHashCode();
         hashCode = (hashCode * 397) ^ IsFeatured.GetHashCode();
         hashCode = (hashCode * 397) ^ IsGiftOnly.GetHashCode();
         hashCode = (hashCode * 397) ^ IsNew.GetHashCode();
         hashCode = (hashCode * 397) ^ IsPurchasableFromMarketplace.GetHashCode();
         hashCode = (hashCode * 397) ^ IsPurchasableWithCredits.GetHashCode();
         hashCode = (hashCode * 397) ^ IsStack.GetHashCode();
         hashCode = (hashCode * 397) ^ (StackedRequisitionPacks?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (LargeImageUrl?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (MediumImageUrl?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ MerchandisingOrder;
         hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (SmallImageUrl?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ XboxMarketplaceProductId.GetHashCode();
         hashCode = (hashCode * 397) ^ (XboxMarketplaceProductUrl?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Exemplo n.º 2
0
        public bool Equals(TrendingEntry input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Weight == input.Weight ||
                     (Weight.Equals(input.Weight))
                     ) &&
                 (
                     IsFeatured == input.IsFeatured ||
                     (IsFeatured != null && IsFeatured.Equals(input.IsFeatured))
                 ) &&
                 (
                     Identifier == input.Identifier ||
                     (Identifier != null && Identifier.Equals(input.Identifier))
                 ) &&
                 (
                     EntityType == input.EntityType ||
                     (EntityType != null && EntityType.Equals(input.EntityType))
                 ) &&
                 (
                     DisplayName == input.DisplayName ||
                     (DisplayName != null && DisplayName.Equals(input.DisplayName))
                 ) &&
                 (
                     Tagline == input.Tagline ||
                     (Tagline != null && Tagline.Equals(input.Tagline))
                 ) &&
                 (
                     Image == input.Image ||
                     (Image != null && Image.Equals(input.Image))
                 ) &&
                 (
                     StartDate == input.StartDate ||
                     (StartDate != null && StartDate.Equals(input.StartDate))
                 ) &&
                 (
                     EndDate == input.EndDate ||
                     (EndDate != null && EndDate.Equals(input.EndDate))
                 ) &&
                 (
                     Link == input.Link ||
                     (Link != null && Link.Equals(input.Link))
                 ) &&
                 (
                     WebmVideo == input.WebmVideo ||
                     (WebmVideo != null && WebmVideo.Equals(input.WebmVideo))
                 ) &&
                 (
                     Mp4Video == input.Mp4Video ||
                     (Mp4Video != null && Mp4Video.Equals(input.Mp4Video))
                 ) &&
                 (
                     FeatureImage == input.FeatureImage ||
                     (FeatureImage != null && FeatureImage.Equals(input.FeatureImage))
                 ) &&
                 (
                     Items == input.Items ||
                     (Items != null && Items.SequenceEqual(input.Items))
                 ) &&
                 (
                     CreationDate == input.CreationDate ||
                     (CreationDate != null && CreationDate.Equals(input.CreationDate))
                 ));
        }