public override int GetHashCode() { unchecked { return(((Sku != null ? Sku.GetHashCode() : 0) * 397) ^ Quantity); } }
public override int GetHashCode() { unchecked { var hashCode = ChargeIntervalFrequency.GetHashCode(); hashCode = (hashCode * 397) ^ CutoffDayOfMonth.GetHashCode(); hashCode = (hashCode * 397) ^ CutoffDayOfWeek.GetHashCode(); hashCode = (hashCode * 397) ^ ExpireAfterSpecificNumberOfCharges.GetHashCode(); hashCode = (hashCode * 397) ^ (FulfillmentService != null ? FulfillmentService.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Grams.GetHashCode(); hashCode = (hashCode * 397) ^ (LinePrice != null ? LinePrice.GetHashCode() : 0); hashCode = (hashCode * 397) ^ OrderDayOfMonth.GetHashCode(); hashCode = (hashCode * 397) ^ OrderDayOfWeek.GetHashCode(); hashCode = (hashCode * 397) ^ OrderIntervalFrequency.GetHashCode(); hashCode = (hashCode * 397) ^ (OrderIntervalUnit != null ? OrderIntervalUnit.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Price != null ? Price.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ProductId.GetHashCode(); hashCode = (hashCode * 397) ^ Quantity.GetHashCode(); hashCode = (hashCode * 397) ^ RequiresShipping.GetHashCode(); hashCode = (hashCode * 397) ^ (Sku != null ? Sku.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Taxable.GetHashCode(); hashCode = (hashCode * 397) ^ (Title != null ? Title.GetHashCode() : 0); hashCode = (hashCode * 397) ^ VariantId.GetHashCode(); hashCode = (hashCode * 397) ^ (VariantTitle != null ? VariantTitle.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Vendor != null ? Vendor.GetHashCode() : 0); return(hashCode); } }
public void Sku_CharAndSkuHaveSameHashCode() { var sku = new Sku('A'); var chr = 'A'; Assert.AreEqual(chr.GetHashCode(), sku.GetHashCode()); }
public void Sku_SkuAndSkuHaveSameHashCode() { var sku1 = new Sku('A'); var sku2 = new Sku('A'); Assert.AreEqual(sku1.GetHashCode(), sku2.GetHashCode()); }
public override int GetHashCode() { int hash = 1; if (AvatarCustomizationClickId != 0) { hash ^= AvatarCustomizationClickId.GetHashCode(); } if (AssetName.Length != 0) { hash ^= AssetName.GetHashCode(); } if (Sku.Length != 0) { hash ^= Sku.GetHashCode(); } if (HasEnoughCoins != false) { hash ^= HasEnoughCoins.GetHashCode(); } if (GroupName.Length != 0) { hash ^= GroupName.GetHashCode(); } if (ColorChoiceId.Length != 0) { hash ^= ColorChoiceId.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hashCode = 1460876522; if (CategoryName != null) { hashCode += CategoryName.GetHashCode(); } if (Sku != null) { hashCode += Sku.GetHashCode(); } if (ItemId != null) { hashCode += ItemId.GetHashCode(); } if (ItemVariationId != null) { hashCode += ItemVariationId.GetHashCode(); } return(hashCode); }
public void EqualsToFamily(bool expected, string family1, string family2) { Sku sku1 = new Sku(null, null, null, family1, null); Sku sku2 = new Sku(null, null, null, family2, null); Assert.AreEqual(expected, sku1.Equals(sku2), "Skus did not match expected equals"); Assert.AreEqual(expected, sku1.GetHashCode() == sku2.GetHashCode(), $"Hashcodes comparison was expect {expected} but was {!expected}, ({sku1.GetHashCode()}, {sku2.GetHashCode()})"); }
public void EqualsToTier(bool expected, SkuTier tier1, SkuTier tier2) { Sku sku1 = new Sku(null, tier1, null, null, null); Sku sku2 = new Sku(null, tier2, null, null, null); Assert.AreEqual(expected, sku1.Equals(sku2), "Skus did not match expected equals"); Assert.AreEqual(expected, sku1.GetHashCode() == sku2.GetHashCode(), $"Hashcodes comparison was expect {expected} but was {!expected}, ({sku1.GetHashCode()}, {sku2.GetHashCode()})"); }
public void EqualsToCapacity(bool expected, int?capacity1, int?capacity2) { Sku sku1 = capacity1 == null ? new Sku(null, null, null, null, null) : new Sku(null, null, null, null, capacity1); Sku sku2 = capacity2 == null ? new Sku(null, null, null, null, null) : new Sku(null, null, null, null, capacity2); Assert.AreEqual(expected, sku1.Equals(sku2), "Skus did not match expected equals"); Assert.AreEqual(expected, sku1.GetHashCode() == sku2.GetHashCode(), $"Hashcodes comparison was expect {expected} but was {!expected}, ({sku1.GetHashCode()}, {sku2.GetHashCode()})"); }
public override int GetHashCode() { unchecked { var hashCode = Sku.GetHashCode(); hashCode = (hashCode * 397) ^ Price; return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = (ProductTitle != null ? ProductTitle.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (VariantTitle != null ? VariantTitle.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (NextChargeScheduledAt != null ? NextChargeScheduledAt.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Price.GetHashCode(); hashCode = (hashCode * 397) ^ Quantity.GetHashCode(); hashCode = (hashCode * 397) ^ ShopifyVariantId.GetHashCode(); hashCode = (hashCode * 397) ^ (Sku != null ? Sku.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Id; hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ModelNumber != null ? ModelNumber.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Sku != null ? Sku.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Price.GetHashCode(); hashCode = (hashCode * 397) ^ NewPrice.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Quantity.GetHashCode(); hashCode = (hashCode * 397) ^ ShopifyProductId.GetHashCode(); hashCode = (hashCode * 397) ^ ShopifyVariantId.GetHashCode(); hashCode = (hashCode * 397) ^ (Price != null ? Price.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ProductTitle != null ? ProductTitle.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Grams.GetHashCode(); hashCode = (hashCode * 397) ^ (Vendor != null ? Vendor.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Sku != null ? Sku.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (VariantTitle != null ? VariantTitle.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Grams.GetHashCode(); hashCode = (hashCode * 397) ^ (Images != null ? Images.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Price != null ? Price.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Quantity.GetHashCode(); hashCode = (hashCode * 397) ^ ShopifyProductId.GetHashCode(); hashCode = (hashCode * 397) ^ (ShopifyVariantId != null ? ShopifyVariantId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Sku != null ? Sku.GetHashCode() : 0); hashCode = (hashCode * 397) ^ SubscriptionId.GetHashCode(); hashCode = (hashCode * 397) ^ (Title != null ? Title.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (VariantTitle != null ? VariantTitle.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (Sku.Length != 0) { hash ^= Sku.GetHashCode(); } if (Category != 0) { hash ^= Category.GetHashCode(); } if (SortOrder != 0) { hash ^= SortOrder.GetHashCode(); } if (Hidden != false) { hash ^= Hidden.GetHashCode(); } if (Sale != false) { hash ^= Sale.GetHashCode(); } if (SpriteId.Length != 0) { hash ^= SpriteId.GetHashCode(); } if (Title.Length != 0) { hash ^= Title.GetHashCode(); } if (Description.Length != 0) { hash ^= Description.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (Sku.Length != 0) { hash ^= Sku.GetHashCode(); } if (Category != 0) { hash ^= Category.GetHashCode(); } if (SortOrder != 0) { hash ^= SortOrder.GetHashCode(); } hash ^= itemIds_.GetHashCode(); hash ^= counts_.GetHashCode(); return(hash); }
public override int GetHashCode() { unchecked { var hashCode = (OrderIntervalUnit != null ? OrderIntervalUnit.GetHashCode() : 0); hashCode = (hashCode * 397) ^ OrderIntervalFrequency.GetHashCode(); hashCode = (hashCode * 397) ^ ChargeIntervalFrequency.GetHashCode(); hashCode = (hashCode * 397) ^ (ProductTitle != null ? ProductTitle.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (VariantTitle != null ? VariantTitle.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Price.GetHashCode(); hashCode = (hashCode * 397) ^ Quantity.GetHashCode(); hashCode = (hashCode * 397) ^ ShopifyVariantId.GetHashCode(); hashCode = (hashCode * 397) ^ OrderDayOfWeek.GetHashCode(); hashCode = (hashCode * 397) ^ OrderDayOfMonth.GetHashCode(); hashCode = (hashCode * 397) ^ ExpireAfterSpecificNumberOfCharges.GetHashCode(); hashCode = (hashCode * 397) ^ (Sku != null ? Sku.GetHashCode() : 0); hashCode = (hashCode * 397) ^ SkuOverride.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Attributes != null?Attributes.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (CatalogVisibility != null ? CatalogVisibility.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Categories != null ? Categories.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ExternalUrl != null ? ExternalUrl.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Featured.GetHashCode(); hashCode = (hashCode * 397) ^ Id; hashCode = (hashCode * 397) ^ (Images != null ? Images.GetHashCode() : 0); hashCode = (hashCode * 397) ^ InStock.GetHashCode(); hashCode = (hashCode * 397) ^ ManageStock.GetHashCode(); hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ OnSale.GetHashCode(); hashCode = (hashCode * 397) ^ ParentId; hashCode = (hashCode * 397) ^ (Permalink != null ? Permalink.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Price != null ? Price.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PriceHtml != null ? PriceHtml.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Purchasable.GetHashCode(); hashCode = (hashCode * 397) ^ (RegularPrice != null ? RegularPrice.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (RelatedIds != null ? RelatedIds.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (SalePrice != null ? SalePrice.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ShortDescription != null ? ShortDescription.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Sku != null ? Sku.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Slug != null ? Slug.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (StockQuantity != null ? StockQuantity.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Tags != null ? Tags.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TaxClass != null ? TaxClass.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TaxStatus != null ? TaxStatus.GetHashCode() : 0); hashCode = (hashCode * 397) ^ TotalSales; hashCode = (hashCode * 397) ^ (Type != null ? Type.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Virtual.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = AddressId.GetHashCode(); hashCode = (hashCode * 397) ^ CreatedAt.GetHashCode(); hashCode = (hashCode * 397) ^ CustomerId.GetHashCode(); hashCode = (hashCode * 397) ^ Id.GetHashCode(); hashCode = (hashCode * 397) ^ NextChargeScheduledAt.GetHashCode(); hashCode = (hashCode * 397) ^ Price.GetHashCode(); hashCode = (hashCode * 397) ^ (ProductTitle != null ? ProductTitle.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Quantity.GetHashCode(); hashCode = (hashCode * 397) ^ RechargeProductId.GetHashCode(); hashCode = (hashCode * 397) ^ ShopifyProductId.GetHashCode(); hashCode = (hashCode * 397) ^ ShopifyVariantId.GetHashCode(); hashCode = (hashCode * 397) ^ (Sku != null ? Sku.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0); hashCode = (hashCode * 397) ^ UpdatedAt.GetHashCode(); hashCode = (hashCode * 397) ^ (VariantTitle != null ? VariantTitle.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = RechargeProductId.GetHashCode(); hashCode = (hashCode * 397) ^ SkuOverride.GetHashCode(); hashCode = (hashCode * 397) ^ Id.GetHashCode(); hashCode = (hashCode * 397) ^ AddressId.GetHashCode(); hashCode = (hashCode * 397) ^ CustomerId.GetHashCode(); hashCode = (hashCode * 397) ^ CreatedAt.GetHashCode(); hashCode = (hashCode * 397) ^ UpdatedAt.GetHashCode(); hashCode = (hashCode * 397) ^ NextChargeScheduledAt.GetHashCode(); hashCode = (hashCode * 397) ^ CancelledAt.GetHashCode(); hashCode = (hashCode * 397) ^ (ProductTitle != null ? ProductTitle.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (VariantTitle != null ? VariantTitle.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Price.GetHashCode(); hashCode = (hashCode * 397) ^ Quantity.GetHashCode(); hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ShopifyProductId.GetHashCode(); hashCode = (hashCode * 397) ^ ShopifyVariantId.GetHashCode(); hashCode = (hashCode * 397) ^ (Sku != null ? Sku.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (OrderIntervalUnit != null ? OrderIntervalUnit.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (OrderIntervalFrequency != null ? OrderIntervalFrequency.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ChargeIntervalFrequency != null ? ChargeIntervalFrequency.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CancellationReason != null ? CancellationReason.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CancellationReasonComments != null ? CancellationReasonComments.GetHashCode() : 0); hashCode = (hashCode * 397) ^ OrderDayOfWeek.GetHashCode(); hashCode = (hashCode * 397) ^ OrderDayOfMonth.GetHashCode(); hashCode = (hashCode * 397) ^ ExpireAfterSpecificNumberOfCharges.GetHashCode(); hashCode = (hashCode * 397) ^ MaxRetriesReached.GetHashCode(); hashCode = (hashCode * 397) ^ HasQueuedCharges.GetHashCode(); hashCode = (hashCode * 397) ^ CommitUpdate.GetHashCode(); return(hashCode); } }
protected override int GetHashCodeCore() { return(Sku.GetHashCode() ^ UnitPrice.GetHashCode()); }
public override int GetHashCode() { int hashCode = -1155387790; if (ItemId != null) { hashCode += ItemId.GetHashCode(); } if (Name != null) { hashCode += Name.GetHashCode(); } if (Sku != null) { hashCode += Sku.GetHashCode(); } if (Upc != null) { hashCode += Upc.GetHashCode(); } if (Ordinal != null) { hashCode += Ordinal.GetHashCode(); } if (PricingType != null) { hashCode += PricingType.GetHashCode(); } if (PriceMoney != null) { hashCode += PriceMoney.GetHashCode(); } if (LocationOverrides != null) { hashCode += LocationOverrides.GetHashCode(); } if (TrackInventory != null) { hashCode += TrackInventory.GetHashCode(); } if (InventoryAlertType != null) { hashCode += InventoryAlertType.GetHashCode(); } if (InventoryAlertThreshold != null) { hashCode += InventoryAlertThreshold.GetHashCode(); } if (UserData != null) { hashCode += UserData.GetHashCode(); } if (ServiceDuration != null) { hashCode += ServiceDuration.GetHashCode(); } if (AvailableForBooking != null) { hashCode += AvailableForBooking.GetHashCode(); } if (ItemOptionValues != null) { hashCode += ItemOptionValues.GetHashCode(); } if (MeasurementUnitId != null) { hashCode += MeasurementUnitId.GetHashCode(); } if (TeamMemberIds != null) { hashCode += TeamMemberIds.GetHashCode(); } return(hashCode); }
public override int GetHashCode() { int hashSku = Sku.GetHashCode(); return(hashSku); }
public override int GetHashCode() { return(Sku.GetHashCode()); }
public CompositeKey UniqueIndex() { return(new CompositeKey { Key1 = Sku?.GetHashCode() ?? 0, Key2 = VariantSku?.GetHashCode() ?? 0, Key3 = 0 }); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Upc != null) { hashCode = hashCode * 59 + Upc.GetHashCode(); } if (Ean != null) { hashCode = hashCode * 59 + Ean.GetHashCode(); } if (Isbn != null) { hashCode = hashCode * 59 + Isbn.GetHashCode(); } if (Asin != null) { hashCode = hashCode * 59 + Asin.GetHashCode(); } if (Title != null) { hashCode = hashCode * 59 + Title.GetHashCode(); } if (Sku != null) { hashCode = hashCode * 59 + Sku.GetHashCode(); } if (Mpn != null) { hashCode = hashCode * 59 + Mpn.GetHashCode(); } if (PartNumber != null) { hashCode = hashCode * 59 + PartNumber.GetHashCode(); } if (Upcs != null) { hashCode = hashCode * 59 + Upcs.GetHashCode(); } if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (Brand != null) { hashCode = hashCode * 59 + Brand.GetHashCode(); } if (Manufacturer != null) { hashCode = hashCode * 59 + Manufacturer.GetHashCode(); } if (Color != null) { hashCode = hashCode * 59 + Color.GetHashCode(); } hashCode = hashCode * 59 + NewPrice.GetHashCode(); hashCode = hashCode * 59 + UsedPrice.GetHashCode(); if (CurrencyCode != null) { hashCode = hashCode * 59 + CurrencyCode.GetHashCode(); } if (Url != null) { hashCode = hashCode * 59 + Url.GetHashCode(); } if (Features != null) { hashCode = hashCode * 59 + Features.GetHashCode(); } if (Dimensions != null) { hashCode = hashCode * 59 + Dimensions.GetHashCode(); } if (Images != null) { hashCode = hashCode * 59 + Images.GetHashCode(); } if (MatchedItems != null) { hashCode = hashCode * 59 + MatchedItems.GetHashCode(); } if (IsoCountryCodes != null) { hashCode = hashCode * 59 + IsoCountryCodes.GetHashCode(); } if (CompanyName != null) { hashCode = hashCode * 59 + CompanyName.GetHashCode(); } if (CompanyAddress != null) { hashCode = hashCode * 59 + CompanyAddress.GetHashCode(); } if (Categories != null) { hashCode = hashCode * 59 + Categories.GetHashCode(); } if (CategoryHierarchies != null) { hashCode = hashCode * 59 + CategoryHierarchies.GetHashCode(); } return(hashCode); } }