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); } }
public bool Equals(RequisitionPack other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(ContentId.Equals(other.ContentId) && CreditPrice == other.CreditPrice && string.Equals(Description, other.Description) && Flair == other.Flair && GiftableAcquisitionMethod == other.GiftableAcquisitionMethod && Id.Equals(other.Id) && IsFeatured == other.IsFeatured && IsGiftOnly == other.IsGiftOnly && IsNew == other.IsNew && IsPurchasableFromMarketplace == other.IsPurchasableFromMarketplace && IsPurchasableWithCredits == other.IsPurchasableWithCredits && IsStack == other.IsStack && StackedRequisitionPacks.OrderBy(srp => srp.Id).SequenceEqual(other.StackedRequisitionPacks.OrderBy(srp => srp.Id)) && string.Equals(LargeImageUrl, other.LargeImageUrl) && string.Equals(MediumImageUrl, other.MediumImageUrl) && MerchandisingOrder == other.MerchandisingOrder && string.Equals(Name, other.Name) && string.Equals(SmallImageUrl, other.SmallImageUrl) && XboxMarketplaceProductId.Equals(other.XboxMarketplaceProductId) && string.Equals(XboxMarketplaceProductUrl, other.XboxMarketplaceProductUrl)); }