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); } }
/// <summary> /// Changes the pass code. /// </summary> /// <param name="newPassCode">The new pass code.</param> /// <returns>Returns true if operation was successful.</returns> public Card ChangePassCode(int newPassCode) { ImageUrl.Replace(PassCode.ToString(), newPassCode.ToString()); SmallImageUrl.Replace(PassCode.ToString(), newPassCode.ToString()); PassCode = newPassCode; return(this); }