示例#1
0
        // Necessary so this class works as expected in collections.
        public override nuint GetNativeHash()
        {
            nuint hashValue = (ItemNameKey is null) ? 0 : (nuint)ItemNameKey.GetHashCode();

            hashValue = hashValue ^ (nuint)Price.GetNativeHash();
            hashValue = hashValue ^ (IconImageName is null ? 0 : (nuint)IconImageName.GetHashCode());
            hashValue = hashValue ^ (nuint)IsAvailable.GetHashCode();
            hashValue = hashValue ^ (nuint)IsDailySpecial.GetHashCode();
            return(hashValue);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            hash ^= prices_.GetHashCode();
            if (lodgingSubtotal_ != null)
            {
                hash ^= LodgingSubtotal.GetHashCode();
            }
            if (incidentalSubtotal_ != null)
            {
                hash ^= IncidentalSubtotal.GetHashCode();
            }
            if (taxesSubtotal_ != null)
            {
                hash ^= TaxesSubtotal.GetHashCode();
            }
            if (feesSubtotal_ != null)
            {
                hash ^= FeesSubtotal.GetHashCode();
            }
            if (estimatedTotal_ != null)
            {
                hash ^= EstimatedTotal.GetHashCode();
            }
            if (IsPriceable != false)
            {
                hash ^= IsPriceable.GetHashCode();
            }
            if (IsAvailable != false)
            {
                hash ^= IsAvailable.GetHashCode();
            }
            if (ViolatesMlos != false)
            {
                hash ^= ViolatesMlos.GetHashCode();
            }
            if (ViolatesCta != false)
            {
                hash ^= ViolatesCta.GetHashCode();
            }
            if (IsAvailableWithHoldDrop != false)
            {
                hash ^= IsAvailableWithHoldDrop.GetHashCode();
            }
            hash ^= suppliedSubtotals_.GetHashCode();
            hash ^= offers_.GetHashCode();
            return(hash);
        }