Пример #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
        public override int GetHashCode()
        {
            int hash = 1;

            if (CmdCode.Length != 0)
            {
                hash ^= CmdCode.GetHashCode();
            }
            if (Identity.Length != 0)
            {
                hash ^= Identity.GetHashCode();
            }
            if (TimeToken.Length != 0)
            {
                hash ^= TimeToken.GetHashCode();
            }
            if (Iccid.Length != 0)
            {
                hash ^= Iccid.GetHashCode();
            }
            if (ImeiType.Length != 0)
            {
                hash ^= ImeiType.GetHashCode();
            }
            if (ImeiVersion.Length != 0)
            {
                hash ^= ImeiVersion.GetHashCode();
            }
            if (Lng != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Lng);
            }
            if (Lat != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Lat);
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #3
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));
            }
        }