예제 #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>
        /// Compares two boot notification requests for equality.
        /// </summary>
        /// <param name="BootNotificationRequest">A boot notification request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(BootNotificationRequest BootNotificationRequest)
        {
            if ((Object)BootNotificationRequest == null)
            {
                return(false);
            }

            return(ChargePointVendor.Equals(BootNotificationRequest.ChargePointVendor) &&
                   ChargePointModel.Equals(BootNotificationRequest.ChargePointModel) &&
                   ChargePointSerialNumber.Equals(BootNotificationRequest.ChargePointSerialNumber) &&
                   FirmwareVersion.Equals(BootNotificationRequest.FirmwareVersion) &&
                   Iccid.Equals(BootNotificationRequest.Iccid) &&
                   IMSI.Equals(BootNotificationRequest.IMSI) &&
                   MeterType.Equals(BootNotificationRequest.MeterType) &&
                   MeterSerialNumber.Equals(BootNotificationRequest.MeterSerialNumber));
        }
예제 #3
0
 public bool AddIccid(Iccid iccid, string providerName)
 {
     try
     {
         var incomingEntity = new IccidTableEntity()
         {
             Iccid        = iccid.Id,
             ProviderName = providerName,
             RowKey       = iccid.Id
         };
         _azureTableStorageClient.Execute(TableOperation.InsertOrMerge(incomingEntity));
     }
     catch (StorageException)
     {
         return(false);
     }
     return(true);
 }
예제 #4
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);
        }
예제 #5
0
        /// <summary>
        /// Return a JSON representation of this object.
        /// </summary>
        /// <param name="CustomBootNotificationRequestSerializer">A delegate to serialize custom boot notification requests.</param>
        public JObject ToJSON(CustomJObjectSerializerDelegate <BootNotificationRequest> CustomBootNotificationRequestSerializer = null)
        {
            var JSON = JSONObject.Create(

                new JProperty("chargePointVendor", ChargePointVendor),
                new JProperty("chargePointModel", ChargePointModel),

                ChargePointSerialNumber.IsNotNullOrEmpty()
                               ? new JProperty("chargePointSerialNumber", ChargePointSerialNumber)
                               : null,

                ChargeBoxSerialNumber.IsNotNullOrEmpty()
                               ? new JProperty("chargeBoxSerialNumber", ChargeBoxSerialNumber)
                               : null,

                FirmwareVersion.IsNotNullOrEmpty()
                               ? new JProperty("firmwareVersion", FirmwareVersion)
                               : null,

                Iccid.IsNotNullOrEmpty()
                               ? new JProperty("iccid", Iccid)
                               : null,

                IMSI.IsNotNullOrEmpty()
                               ? new JProperty("imsi", IMSI)
                               : null,

                MeterType.IsNotNullOrEmpty()
                               ? new JProperty("meterType", MeterType)
                               : null,

                MeterSerialNumber.IsNotNullOrEmpty()
                               ? new JProperty("meterSerialNumber", MeterSerialNumber)
                               : null

                );

            return(CustomBootNotificationRequestSerializer != null
                       ? CustomBootNotificationRequestSerializer(this, JSON)
                       : JSON);
        }
예제 #6
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));
            }
        }
 public List <SessionInfo> GetSingleSessionInfo(Iccid iccid)
 {
     return(this.cellularService.GetSingleSessionInfo(iccid));
 }
 public Terminal GetSingleTerminalDetails(Iccid iccid)
 {
     return(this.cellularService.GetSingleTerminalDetails(iccid));
 }
 public List<SessionInfo> GetSingleSessionInfo(Iccid iccid)
 {
     return this.cellularService.GetSingleSessionInfo(iccid);
 }
 public Terminal GetSingleTerminalDetails(Iccid iccid)
 {
     return this.cellularService.GetSingleTerminalDetails(iccid);
 }