Esempio n. 1
0
 public void CopyTo(ProductExtensionComponent to)
 {
     to.Style    = Style;
     to.FuelType = FuelType;
     to.NaturalGasConversionAvailable = NaturalGasConversionAvailable;
     to.DimensionsHeightHoodOpen      = DimensionsHeightHoodOpen;
     to.DimensionsHeightHoodClosed    = DimensionsHeightHoodClosed;
     to.DimensionsWidth = DimensionsWidth;
     to.DimensionsDepth = DimensionsDepth;
 }
 private bool ProductExtensionComponentEquality(ProductExtensionComponent x, ProductExtensionComponent y)
 {
     if (x == null && y == null)
     {
         return(true);
     }
     if (x == null || y == null)
     {
         return(false);
     }
     return(SellableItemProductExtensionComponentComparer.Equals(x, y));
 }
Esempio n. 3
0
        public static bool MemberEquality(ProductExtensionComponent x, ProductExtensionComponent y)
        {
            if (x == null || y == null)
            {
                return(false);
            }

            return(x.Style == y.Style &&
                   x.FuelType == y.FuelType &&
                   x.NaturalGasConversionAvailable == y.NaturalGasConversionAvailable &&
                   x.DimensionsHeightHoodOpen == y.DimensionsHeightHoodOpen &&
                   x.DimensionsHeightHoodClosed == y.DimensionsHeightHoodClosed &&
                   x.DimensionsWidth == y.DimensionsWidth &&
                   x.DimensionsDepth == y.DimensionsDepth);
        }
Esempio n. 4
0
        internal static int GetHashCodeMembers(ProductExtensionComponent obj)
        {
            if (obj == null)
            {
                return(0);
            }

            // https://stackoverflow.com/questions/263400/what-is-the-best-algorithm-for-an-overridden-system-object-gethashcode
            unchecked
            {
                int hash = 17;
                if (obj.Style != null)
                {
                    hash = hash * 23 + obj.Style.GetHashCode();
                }
                if (obj.FuelType != null)
                {
                    hash = hash * 23 + obj.FuelType.GetHashCode();
                }
                if (obj.NaturalGasConversionAvailable != null)
                {
                    hash = hash * 23 + obj.NaturalGasConversionAvailable.GetHashCode();
                }
                if (obj.DimensionsHeightHoodOpen != null)
                {
                    hash = hash * 23 + obj.DimensionsHeightHoodOpen.GetHashCode();
                }
                if (obj.DimensionsHeightHoodClosed != null)
                {
                    hash = hash * 23 + obj.DimensionsHeightHoodClosed.GetHashCode();
                }
                if (obj.DimensionsWidth != null)
                {
                    hash = hash * 23 + obj.DimensionsWidth.GetHashCode();
                }
                if (obj.DimensionsDepth != null)
                {
                    hash = hash * 23 + obj.DimensionsDepth.GetHashCode();
                }
                return(hash);
            }
        }