コード例 #1
0
 /// <summary>
 /// Return the HashCode of this object.
 /// </summary>
 /// <returns>The HashCode of this object.</returns>
 public override Int32 GetHashCode()
 {
     unchecked
     {
         return(ChargePointVendor.GetHashCode() * 31 ^
                ChargePointModel.GetHashCode() * 29 ^
                ChargePointSerialNumber.GetHashCode() * 23 ^
                FirmwareVersion.GetHashCode() * 17 ^
                Iccid.GetHashCode() * 11 ^
                IMSI.GetHashCode() * 7 ^
                MeterType.GetHashCode() * 5 ^
                MeterSerialNumber.GetHashCode());
     }
 }
コード例 #2
0
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return(ChargePointVendor.GetHashCode() * 31 ^
                       ChargePointModel.GetHashCode() * 29 ^

                       (ChargePointSerialNumber != null
                            ? ChargePointSerialNumber.GetHashCode() * 21
                            : 0) ^

                       (ChargeBoxSerialNumber != null
                            ? ChargeBoxSerialNumber.GetHashCode() * 17
                            : 0) ^

                       (FirmwareVersion != null
                            ? FirmwareVersion.GetHashCode() * 13
                            : 0) ^

                       (Iccid != null
                            ? Iccid.GetHashCode() * 11
                            : 0) ^

                       (IMSI != null
                            ? IMSI.GetHashCode() * 7
                            : 0) ^

                       (MeterType != null
                            ? MeterType.GetHashCode() * 5
                            : 0) ^

                       (MeterSerialNumber != null
                            ? MeterSerialNumber.GetHashCode() * 3
                            : 0));
            }
        }