/// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="CustomSetChargingStationAvailabilityStatusRequestSerializer">A delegate to serialize custom set ChargingStation availability status request XML elements.</param>
        public XElement ToXML(CustomXMLSerializerDelegate <SetChargingStationAvailabilityStatusRequest> CustomSetChargingStationAvailabilityStatusRequestSerializer = null)
        {
            var XML = new XElement(eMIPNS.EVCIDynamic + "eMIP_ToIOP_SetChargingStationAvailabilityStatusRequest",

                                   TransactionId.HasValue
                              ? new XElement(eMIPNS.EVCIDynamic + "transactionId", TransactionId.ToString())
                              : null,

                                   new XElement(eMIPNS.EVCIDynamic + "partnerIdType", PartnerId.Format.ToString()),
                                   new XElement(eMIPNS.EVCIDynamic + "partnerId", PartnerId.ToString()),

                                   new XElement(eMIPNS.EVCIDynamic + "operatorIdType", OperatorId.Format.ToString()),
                                   new XElement(eMIPNS.EVCIDynamic + "operatorId", OperatorId.ToString()),

                                   new XElement(eMIPNS.EVCIDynamic + "ChargingStationIdType", ChargingStationId.Format.ToString()),
                                   new XElement(eMIPNS.EVCIDynamic + "ChargingStationId", ChargingStationId.ToString()),

                                   new XElement(eMIPNS.EVCIDynamic + "statusEventDate", StatusEventDate.ToIso8601(false)),
                                   new XElement(eMIPNS.EVCIDynamic + "availabilityStatus", AvailabilityStatus.AsNumber()),

                                   AvailabilityStatusUntil.HasValue
                              ? new XElement(eMIPNS.EVCIDynamic + "availabilityStatusUntil", AvailabilityStatusUntil.Value.ToIso8601(false))
                              : null,

                                   AvailabilityStatusComment.IsNeitherNullNorEmpty()
                              ? new XElement(eMIPNS.EVCIDynamic + "availabilityStatusComment", AvailabilityStatusComment)
                              : null

                                   );


            return(CustomSetChargingStationAvailabilityStatusRequestSerializer != null
                       ? CustomSetChargingStationAvailabilityStatusRequestSerializer(this, XML)
                       : XML);
        }
 public override int GetHashCode()
 {
     unchecked {
         const int randomPrime = 397;
         int       hashCode    = Id.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ SourceTypeID.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ SourceId.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ (Name_Latin != null ? Name_Latin.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (FamilyName_Latin != null ? FamilyName_Latin.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (Name_Cyrillic != null ? Name_Cyrillic.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (FamilyName_Cyrillic != null ? FamilyName_Cyrillic.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (Sex != null ? Sex.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (FatherName != null ? FatherName.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (DateOfBirth != null ? DateOfBirth.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (Citizenship != null ? Citizenship.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (PlaceOfBirthId != null ? PlaceOfBirthId.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (PlaceOfEmigrationId != null ? PlaceOfEmigrationId.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (PlaceOfLivingId != null ? PlaceOfLivingId.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (FatherId != null ? FatherId.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (MotherId != null ? MotherId.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (MaritalStatus != null ? MaritalStatus.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (PartnerId != null ? PartnerId.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (Profession != null ? Profession.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (Notice != null ? Notice.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (PhotoNumber != null ? PhotoNumber.GetHashCode() : 0);
         return(hashCode);
     }
 }
        /// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="CustomSetSessionEventReportRequestSerializer">A delegate to serialize custom set EVSE busy status request XML elements.</param>
        public XElement ToXML(CustomXMLSerializerDelegate <SetSessionEventReportRequest> CustomSetSessionEventReportRequestSerializer = null)
        {
            var XML = new XElement(eMIPNS.Authorisation + "eMIP_ToIOP_SetSessionEventReportRequest",

                                   TransactionId.HasValue
                              ? new XElement("transactionId", TransactionId.ToString())
                              : null,

                                   new XElement("partnerIdType", PartnerId.Format.AsText()),
                                   new XElement("partnerId", PartnerId.ToString()),

                                   new XElement("operatorIdType", OperatorId.Format.AsText()),
                                   new XElement("operatorId", OperatorId.ToString()),

                                   new XElement("serviceSessionId", ServiceSessionId.ToString()),

                                   SessionEvent.ToXML(),

                                   ExecPartnerSessionId.HasValue
                              ? new XElement("execPartnerSessionId", ExecPartnerSessionId.ToString())
                              : null

                                   );


            return(CustomSetSessionEventReportRequestSerializer != null
                       ? CustomSetSessionEventReportRequestSerializer(this, XML)
                       : XML);
        }
Exemple #4
0
        /// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="CustomSetChargeDetailRecordRequestSerializer">A delegate to serialize custom SetChargeDetailRecord request XML elements.</param>
        /// <param name="CustomChargeDetailRecordSerializer">A delegate to serialize custom ChargeDetailRecord XML elements.</param>
        /// <param name="CustomMeterReportSerializer">A delegate to serialize custom MeterReport XML elements.</param>
        public XElement ToXML(CustomXMLSerializerDelegate <SetChargeDetailRecordRequest> CustomSetChargeDetailRecordRequestSerializer = null,
                              CustomXMLSerializerDelegate <ChargeDetailRecord> CustomChargeDetailRecordSerializer = null,
                              CustomXMLSerializerDelegate <MeterReport> CustomMeterReportSerializer = null)
        {
            var XML = new XElement(eMIPNS.Authorisation + "eMIP_ToIOP_SetChargeDetailRecordRequest",

                                   TransactionId.HasValue
                              ? new XElement("transactionId", TransactionId.ToString())
                              : null,

                                   new XElement("partnerIdType", PartnerId.Format.AsText()),
                                   new XElement("partnerId", PartnerId.ToString()),

                                   new XElement("operatorIdType", OperatorId.Format.AsText()),
                                   new XElement("operatorId", OperatorId.ToString()),

                                   ChargeDetailRecord.ToXML(CustomChargeDetailRecordSerializer: CustomChargeDetailRecordSerializer,
                                                            CustomMeterReportSerializer:        CustomMeterReportSerializer)

                                   );


            return(CustomSetChargeDetailRecordRequestSerializer != null
                       ? CustomSetChargeDetailRecordRequestSerializer(this, XML)
                       : XML);
        }
        /// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="CustomSetEVSEBusyStatusRequestSerializer">A delegate to serialize custom set EVSE busy status request XML elements.</param>
        public XElement ToXML(CustomXMLSerializerDelegate <SetEVSEBusyStatusRequest> CustomSetEVSEBusyStatusRequestSerializer = null)
        {
            var XML = new XElement(eMIPNS.EVCIDynamic + "eMIP_ToIOP_SetEVSEBusyStatusRequest",

                                   TransactionId.HasValue
                              ? new XElement("transactionId", TransactionId.ToString())
                              : null,

                                   new XElement("partnerIdType", PartnerId.Format.AsText()),
                                   new XElement("partnerId", PartnerId.ToString()),

                                   new XElement("operatorIdType", OperatorId.Format.AsText()),
                                   new XElement("operatorId", OperatorId.ToString()),

                                   new XElement("EVSEIdType", EVSEId.Format.AsText()),
                                   new XElement("EVSEId", EVSEId.ToString()),

                                   new XElement("statusEventDate", StatusEventDate.ToIso8601(false).Replace("Z", "")),
                                   new XElement("busyStatus", BusyStatus.AsNumber()),

                                   BusyStatusUntil.HasValue
                              ? new XElement("busyStatusUntil", BusyStatusUntil.Value.ToIso8601(false).Replace("Z", ""))
                              : null,

                                   BusyStatusComment.IsNeitherNullNorEmpty()
                              ? new XElement("busyStatusComment", BusyStatusComment)
                              : null

                                   );


            return(CustomSetEVSEBusyStatusRequestSerializer != null
                       ? CustomSetEVSEBusyStatusRequestSerializer(this, XML)
                       : XML);
        }
Exemple #6
0
        /// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="CustomGetServiceAuthorisationRequestSerializer">A delegate to serialize custom set EVSE busy status request XML elements.</param>
        public XElement ToXML(CustomXMLSerializerDelegate <GetServiceAuthorisationRequest> CustomGetServiceAuthorisationRequestSerializer = null)
        {
            var XML = new XElement(eMIPNS.Authorisation + "eMIP_ToIOP_GetServiceAuthorisationRequest",

                                   TransactionId.HasValue
                              ? new XElement("transactionId", TransactionId.ToString())
                              : null,

                                   new XElement("partnerIdType", PartnerId.Format.AsText()),
                                   new XElement("partnerId", PartnerId.ToString()),

                                   new XElement("operatorIdType", OperatorId.Format.AsText()),
                                   new XElement("operatorId", OperatorId.ToString()),

                                   new XElement("EVSEIdType", EVSEId.Format.AsText()),
                                   new XElement("EVSEId", EVSEId.ToString()),

                                   new XElement("userIdType", UserId.Format.AsText()),
                                   new XElement("userId", UserId.ToString()),

                                   new XElement("requestedServiceId", RequestedServiceId.ToString()),

                                   PartnerServiceSessionId.HasValue
                              ? new XElement("partnerServiceSessionId", PartnerServiceSessionId.Value.ToString())
                              : null

                                   );


            return(CustomGetServiceAuthorisationRequestSerializer != null
                       ? CustomGetServiceAuthorisationRequestSerializer(this, XML)
                       : XML);
        }
Exemple #7
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (FortressTemplateGmtId.Length != 0)
            {
                hash ^= FortressTemplateGmtId.GetHashCode();
            }
            hash ^= chambers_.GetHashCode();
            if (PartnerId.Length != 0)
            {
                hash ^= PartnerId.GetHashCode();
            }
            if (poiDetails_ != null)
            {
                hash ^= PoiDetails.GetHashCode();
            }
            if (PoiAccessibility != 0)
            {
                hash ^= PoiAccessibility.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #8
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Status != 0)
            {
                hash ^= Status.GetHashCode();
            }
            if (state_ != null)
            {
                hash ^= State.GetHashCode();
            }
            if (playerSnapshot_ != null)
            {
                hash ^= PlayerSnapshot.GetHashCode();
            }
            if (PartnerId.Length != 0)
            {
                hash ^= PartnerId.GetHashCode();
            }
            if (FortressCooldownLeftMs != 0UL)
            {
                hash ^= FortressCooldownLeftMs.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #9
0
        public override int GetHashCode()
        {
            int hash = 1;

            hash ^= imageUrls_.GetHashCode();
            if (currentMenu_ != null)
            {
                hash ^= CurrentMenu.GetHashCode();
            }
            if (PartnerId.Length != 0)
            {
                hash ^= PartnerId.GetHashCode();
            }
            if (poiDetails_ != null)
            {
                hash ^= PoiDetails.GetHashCode();
            }
            if (PoiAccessibility != 0)
            {
                hash ^= PoiAccessibility.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #10
0
        /// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="CustomSetServiceAuthorisationRequestSerializer">A delegate to serialize custom set EVSE busy status request XML elements.</param>
        /// <param name="CustomMeterReportSerializer">A delegate to serialize custom MeterReport XML elements.</param>
        public XElement ToXML(CustomXMLSerializerDelegate <SetServiceAuthorisationRequest> CustomSetServiceAuthorisationRequestSerializer = null,
                              CustomXMLSerializerDelegate <MeterReport> CustomMeterReportSerializer = null)
        {
            var XML = new XElement(eMIPNS.Authorisation + "eMIP_ToIOP_SetServiceAuthorisationRequest",

                                   TransactionId.HasValue
                              ? new XElement("transactionId", TransactionId.ToString())
                              : null,

                                   new XElement("partnerIdType", PartnerId.Format.AsText()),
                                   new XElement("partnerId", PartnerId.ToString()),

                                   new XElement("operatorIdType", OperatorId.Format.AsText()),
                                   new XElement("operatorId", OperatorId.ToString()),

                                   new XElement("EVSEIdType", EVSEId.Format.AsText()),
                                   new XElement("EVSEId", EVSEId.ToString()),

                                   new XElement("userIdType", UserId.Format.AsText()),
                                   new XElement("userId", UserId.ToString()),

                                   new XElement("requestedServiceId", RequestedServiceId.ToString()),
                                   new XElement("authorisationValue", AuthorisationValue.ToString()),
                                   new XElement("intermediateCDRRequested", IntermediateCDRRequested ? "1" : "0"),

                                   PartnerServiceSessionId.HasValue
                              ? new XElement("serviceSessionId", PartnerServiceSessionId.ToString())
                              : null,

                                   UserContractIdAlias.HasValue
                              ? new XElement("userContractIdAlias", UserContractIdAlias.ToString())
                              : null,

                                   MeterLimits.SafeAny()
                              ? new XElement("meterLimitList", MeterLimits.Select(meterreport => meterreport.ToXML(CustomMeterReportSerializer: CustomMeterReportSerializer)))
                              : null,

                                   Parameter.IsNotNullOrEmpty()
                              ? new XElement("parameter", Parameter)
                              : null,

                                   BookingId.HasValue
                              ? new XElement("bookingId", BookingId.ToString())
                              : null,

                                   SalePartnerBookingId.HasValue
                              ? new XElement("salePartnerBookingId", SalePartnerBookingId.ToString())
                              : null

                                   );


            return(CustomSetServiceAuthorisationRequestSerializer != null
                       ? CustomSetServiceAuthorisationRequestSerializer(this, XML)
                       : XML);
        }
        /// <summary>
        /// Gets the hash code for this object.
        /// </summary>
        /// <returns>
        /// The hash code for this object.
        /// </returns>
        /// <remarks>
        /// * CA2218:
        ///   * If two objects are equal in value based on the Equals override, they must both return the same value for calls
        ///     to GetHashCode.
        ///   * GetHashCode must be overridden whenever Equals is overridden.
        /// * It is fine if the value overflows.
        /// </remarks>
        public override int GetHashCode()
        {
            int result = PartnerId.GetHashCode();

            if (PartnerUserId != null)
            {
                result += PartnerUserId.GetHashCode();
            }

            return(result);
        }
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return((TransactionId.HasValue
                            ? TransactionId.GetHashCode() * 5
                            : 0) ^

                       PartnerId.GetHashCode() * 3 ^
                       OperatorId.GetHashCode());
            }
        }
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="HeartbeatRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(HeartbeatRequest HeartbeatRequest)
        {
            if ((Object)HeartbeatRequest == null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !HeartbeatRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && HeartbeatRequest.TransactionId.HasValue && TransactionId.Value.Equals(HeartbeatRequest.TransactionId.Value))) &&

                   PartnerId.Equals(HeartbeatRequest.PartnerId) &&
                   OperatorId.Equals(HeartbeatRequest.OperatorId));
        }
Exemple #14
0
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return((TransactionId.HasValue
                            ? TransactionId.GetHashCode() * 7
                            : 0) ^

                       PartnerId.GetHashCode() * 5 ^
                       OperatorId.GetHashCode() * 3 ^
                       ChargeDetailRecord.GetHashCode());
            }
        }
Exemple #15
0
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="SetChargeDetailRecordRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetChargeDetailRecordRequest SetChargeDetailRecordRequest)
        {
            if ((Object)SetChargeDetailRecordRequest == null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !SetChargeDetailRecordRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && SetChargeDetailRecordRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetChargeDetailRecordRequest.TransactionId.Value))) &&

                   PartnerId.Equals(SetChargeDetailRecordRequest.PartnerId) &&
                   OperatorId.Equals(SetChargeDetailRecordRequest.OperatorId) &&
                   ChargeDetailRecord.Equals(SetChargeDetailRecordRequest.ChargeDetailRecord));
        }
        /// <summary>
        /// Gets the hash code for this object.
        /// </summary>
        /// <returns>
        /// The hash code for this object.
        /// </returns>
        /// <remarks>
        /// * CA2218:
        ///   * If two objects are equal in value based on the Equals override, they must both return the same value for calls
        ///     to GetHashCode.
        ///   * GetHashCode must be overridden whenever Equals is overridden.
        /// * It is fine if the value overflows.
        /// </remarks>
        public override int GetHashCode()
        {
            int result = PartnerId.GetHashCode();

            if (PartnerCardId != null)
            {
                result += PartnerCardId.GetHashCode();
            }

            if (PartnerCardSuffix != null)
            {
                result += PartnerCardSuffix.GetHashCode();
            }

            return(result);
        }
        /// <summary>
        /// Gets the hash code for this object.
        /// </summary>
        /// <returns>
        /// The hash code for this object.
        /// </returns>
        /// <remarks>
        /// * CA2218:
        ///   * If two objects are equal in value based on the Equals override, they must both return the same value for calls
        ///     to GetHashCode.
        ///   * GetHashCode must be overridden whenever Equals is overridden.
        /// * It is fine if the value overflows.
        /// </remarks>
        public override int GetHashCode()
        {
            int result = PartnerId.GetHashCode();

            foreach (PartnerMerchantLocationInfo partnerMerchantLocationInfo in PartnerMerchantLocations)
            {
                result += partnerMerchantLocationInfo.GetHashCode();
            }

            if (PartnerDealId != null)
            {
                result += PartnerDealId.GetHashCode();
            }

            return(result);
        }
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return((TransactionId.HasValue
                            ? TransactionId.GetHashCode() * 31
                            : 0) ^

                       PartnerId.GetHashCode() * 29 ^
                       OperatorId.GetHashCode() * 23 ^
                       EVSEId.GetHashCode() * 21 ^


                       (AvailabilityStatusEventDate.HasValue
                            ? AvailabilityStatusEventDate.GetHashCode() * 19
                            : 0) ^

                       (AvailabilityStatus.HasValue
                            ? AvailabilityStatus.GetHashCode() * 17
                            : 0) ^

                       (AvailabilityStatusUntil.HasValue
                            ? AvailabilityStatusUntil.GetHashCode() * 13
                            : 0) ^

                       (AvailabilityStatusComment.IsNeitherNullNorEmpty()
                            ? AvailabilityStatusComment.GetHashCode() * 11
                            : 0) ^


                       (BusyStatusEventDate.HasValue
                            ? BusyStatusEventDate.GetHashCode() * 7
                            : 0) ^

                       (BusyStatus.HasValue
                            ? BusyStatus.GetHashCode() * 3
                            : 0) ^

                       (BusyStatusUntil.HasValue
                            ? BusyStatusUntil.GetHashCode() * 3
                            : 0) ^

                       (BusyStatusComment.IsNeitherNullNorEmpty()
                            ? BusyStatusComment.GetHashCode()
                            : 0));
            }
        }
Exemple #19
0
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="SetSessionActionRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetSessionActionRequest SetSessionActionRequest)
        {
            if (SetSessionActionRequest is null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !SetSessionActionRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && SetSessionActionRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetSessionActionRequest.TransactionId.Value))) &&

                   PartnerId.Equals(SetSessionActionRequest.PartnerId) &&
                   OperatorId.Equals(SetSessionActionRequest.OperatorId) &&
                   ServiceSessionId.Equals(SetSessionActionRequest.ServiceSessionId) &&
                   SessionAction.Equals(SetSessionActionRequest.SessionAction) &&

                   ((!SalePartnerSessionId.HasValue && !SetSessionActionRequest.SalePartnerSessionId.HasValue) ||
                    (SalePartnerSessionId.HasValue && SetSessionActionRequest.SalePartnerSessionId.HasValue && SalePartnerSessionId.Equals(SetSessionActionRequest.SalePartnerSessionId))));
        }
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="SetSessionEventReportRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetSessionEventReportRequest SetSessionEventReportRequest)
        {
            if (SetSessionEventReportRequest is null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !SetSessionEventReportRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && SetSessionEventReportRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetSessionEventReportRequest.TransactionId.Value))) &&

                   PartnerId.Equals(SetSessionEventReportRequest.PartnerId) &&
                   OperatorId.Equals(SetSessionEventReportRequest.OperatorId) &&
                   ServiceSessionId.Equals(SetSessionEventReportRequest.ServiceSessionId) &&
                   SessionEvent.Equals(SetSessionEventReportRequest.SessionEvent) &&

                   ((!ExecPartnerSessionId.HasValue && !SetSessionEventReportRequest.ExecPartnerSessionId.HasValue) ||
                    (ExecPartnerSessionId.HasValue && SetSessionEventReportRequest.ExecPartnerSessionId.HasValue && ExecPartnerSessionId.Equals(SetSessionEventReportRequest.ExecPartnerSessionId))));
        }
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return((TransactionId.HasValue
                            ? TransactionId.GetHashCode() * 13
                            : 0) ^

                       PartnerId.GetHashCode() * 11 ^
                       OperatorId.GetHashCode() * 7 ^
                       ServiceSessionId.GetHashCode() * 5 ^
                       SessionEvent.GetHashCode() * 3 ^

                       (ExecPartnerSessionId.HasValue
                            ? ExecPartnerSessionId.GetHashCode()
                            : 0));
            }
        }
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="SetServiceAuthorisationRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetServiceAuthorisationRequest SetServiceAuthorisationRequest)
        {

            if ((Object) SetServiceAuthorisationRequest == null)
                return false;

            return ((!TransactionId.HasValue && !SetServiceAuthorisationRequest.TransactionId.HasValue) ||
                     (TransactionId.HasValue && SetServiceAuthorisationRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetServiceAuthorisationRequest.TransactionId.Value))) &&

                   PartnerId.         Equals(SetServiceAuthorisationRequest.PartnerId)          &&
                   OperatorId.        Equals(SetServiceAuthorisationRequest.OperatorId)         &&
                   EVSEId.            Equals(SetServiceAuthorisationRequest.EVSEId)             &&
                   UserId.            Equals(SetServiceAuthorisationRequest.UserId)             &&
                   RequestedServiceId.Equals(SetServiceAuthorisationRequest.RequestedServiceId);

                   //((!PartnerServiceSessionId.HasValue && !SetServiceAuthorisationRequest.PartnerServiceSessionId.HasValue) ||
                   //  (PartnerServiceSessionId.HasValue &&  SetServiceAuthorisationRequest.PartnerServiceSessionId.HasValue && PartnerServiceSessionId.Value.Equals(SetServiceAuthorisationRequest.PartnerServiceSessionId.Value)));

        }
Exemple #23
0
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="GetServiceAuthorisationRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(GetServiceAuthorisationRequest GetServiceAuthorisationRequest)
        {
            if ((Object)GetServiceAuthorisationRequest == null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !GetServiceAuthorisationRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && GetServiceAuthorisationRequest.TransactionId.HasValue && TransactionId.Value.Equals(GetServiceAuthorisationRequest.TransactionId.Value))) &&

                   PartnerId.Equals(GetServiceAuthorisationRequest.PartnerId) &&
                   OperatorId.Equals(GetServiceAuthorisationRequest.OperatorId) &&
                   EVSEId.Equals(GetServiceAuthorisationRequest.EVSEId) &&
                   UserId.Equals(GetServiceAuthorisationRequest.UserId) &&
                   RequestedServiceId.Equals(GetServiceAuthorisationRequest.RequestedServiceId) &&

                   ((!PartnerServiceSessionId.HasValue && !GetServiceAuthorisationRequest.PartnerServiceSessionId.HasValue) ||
                    (PartnerServiceSessionId.HasValue && GetServiceAuthorisationRequest.PartnerServiceSessionId.HasValue && PartnerServiceSessionId.Value.Equals(GetServiceAuthorisationRequest.PartnerServiceSessionId.Value))));
        }
Exemple #24
0
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return((TransactionId.HasValue
                            ? TransactionId.GetHashCode() * 19
                            : 0) ^

                       PartnerId.GetHashCode() * 17 ^
                       OperatorId.GetHashCode() * 13 ^
                       EVSEId.GetHashCode() * 11 ^
                       UserId.GetHashCode() * 7 ^
                       RequestedServiceId.GetHashCode() * 3);

                //(PartnerServiceSessionId.HasValue
                //     ? PartnerServiceSessionId.GetHashCode()
                //     : 0);
            }
        }
        /// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="CustomHeartbeatRequestSerializer">A delegate to serialize custom Heartbeat request XML elements.</param>
        public XElement ToXML(CustomXMLSerializerDelegate <HeartbeatRequest> CustomHeartbeatRequestSerializer = null)
        {
            var XML = new XElement(eMIPNS.Default + "eMIP_ToIOP_HeartBeatRequest",

                                   TransactionId.HasValue
                              ? new XElement("transactionId", TransactionId.ToString())
                              : null,

                                   new XElement("partnerIdType", PartnerId.Format.AsText()),
                                   new XElement("partnerId", PartnerId.ToString()),

                                   new XElement("operatorIdType", OperatorId.Format.AsText()),
                                   new XElement("operatorId", OperatorId.ToString())

                                   );


            return(CustomHeartbeatRequestSerializer != null
                       ? CustomHeartbeatRequestSerializer(this, XML)
                       : XML);
        }
Exemple #26
0
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return(TransactionId.GetHashCode() * 21 ^
                       PartnerId.GetHashCode() * 19 ^
                       OperatorId.GetHashCode() * 17 ^
                       TargetOperatorId.GetHashCode() * 13 ^
                       EVSEId.GetHashCode() * 11 ^
                       UserId.GetHashCode() * 7 ^
                       RequestedServiceId.GetHashCode() * 5 ^

                       (ServiceSessionId.HasValue
                            ? ServiceSessionId.GetHashCode() * 3
                            : 0) ^

                       (BookingId.HasValue
                            ? BookingId.GetHashCode()
                            : 0));
            }
        }
        private References UpdatePartner(Member arg, DateTime since, bool noncycle)
        {
            if (noncycle)
            {
                if (arg == null)
                {
                    if (TryGetPartner(out Member value, since))
                    {
                        value.Refs.UpdatePartner(arg, since, false);
                    }
                }
                else
                {
                    arg.Refs.UpdatePartner(Source, since, false);
                }
            }

            Partner.AddChange(arg, since);
            PartnerId.AddChange(arg?.Id, since);
            return(this);
        }
Exemple #28
0
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="GetServiceAuthorisationRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(GetServiceAuthorisationRequest GetServiceAuthorisationRequest)
        {
            if (GetServiceAuthorisationRequest is null)
            {
                return(false);
            }

            return(TransactionId.Equals(GetServiceAuthorisationRequest.TransactionId) &&
                   PartnerId.Equals(GetServiceAuthorisationRequest.PartnerId) &&
                   OperatorId.Equals(GetServiceAuthorisationRequest.OperatorId) &&
                   TargetOperatorId.Equals(GetServiceAuthorisationRequest.TargetOperatorId) &&
                   EVSEId.Equals(GetServiceAuthorisationRequest.EVSEId) &&
                   UserId.Equals(GetServiceAuthorisationRequest.UserId) &&
                   RequestedServiceId.Equals(GetServiceAuthorisationRequest.RequestedServiceId) &&

                   ((!ServiceSessionId.HasValue && !GetServiceAuthorisationRequest.ServiceSessionId.HasValue) ||
                    (ServiceSessionId.HasValue && GetServiceAuthorisationRequest.ServiceSessionId.HasValue && ServiceSessionId.Value.Equals(GetServiceAuthorisationRequest.ServiceSessionId.Value))) &&

                   ((!BookingId.HasValue && !GetServiceAuthorisationRequest.BookingId.HasValue) ||
                    (BookingId.HasValue && GetServiceAuthorisationRequest.BookingId.HasValue && BookingId.Value.Equals(GetServiceAuthorisationRequest.BookingId.Value))));
        }
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="SetChargingStationAvailabilityStatusRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetChargingStationAvailabilityStatusRequest SetChargingStationAvailabilityStatusRequest)
        {
            if ((Object)SetChargingStationAvailabilityStatusRequest == null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !SetChargingStationAvailabilityStatusRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && SetChargingStationAvailabilityStatusRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetChargingStationAvailabilityStatusRequest.TransactionId.Value))) &&

                   PartnerId.Equals(SetChargingStationAvailabilityStatusRequest.PartnerId) &&
                   OperatorId.Equals(SetChargingStationAvailabilityStatusRequest.OperatorId) &&
                   ChargingStationId.Equals(SetChargingStationAvailabilityStatusRequest.ChargingStationId) &&
                   StatusEventDate.Equals(SetChargingStationAvailabilityStatusRequest.StatusEventDate) &&
                   AvailabilityStatus.Equals(SetChargingStationAvailabilityStatusRequest.AvailabilityStatus) &&

                   ((!AvailabilityStatusUntil.HasValue && !SetChargingStationAvailabilityStatusRequest.AvailabilityStatusUntil.HasValue) ||
                    (AvailabilityStatusUntil.HasValue && SetChargingStationAvailabilityStatusRequest.AvailabilityStatusUntil.HasValue && AvailabilityStatusUntil.Value.Equals(SetChargingStationAvailabilityStatusRequest.AvailabilityStatusUntil.Value))) &&

                   ((!AvailabilityStatusComment.IsNeitherNullNorEmpty() && !SetChargingStationAvailabilityStatusRequest.AvailabilityStatusComment.IsNeitherNullNorEmpty()) ||
                    (AvailabilityStatusComment.IsNeitherNullNorEmpty() && SetChargingStationAvailabilityStatusRequest.AvailabilityStatusComment.IsNeitherNullNorEmpty() && AvailabilityStatusComment.Equals(SetChargingStationAvailabilityStatusRequest.AvailabilityStatusComment))));
        }
        /// <summary>
        /// Compares two SetEVSEBusyStatus requests for equality.
        /// </summary>
        /// <param name="SetEVSEBusyStatusRequest">A SetEVSEBusyStatus request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetEVSEBusyStatusRequest SetEVSEBusyStatusRequest)
        {
            if ((Object)SetEVSEBusyStatusRequest == null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !SetEVSEBusyStatusRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && SetEVSEBusyStatusRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetEVSEBusyStatusRequest.TransactionId.Value))) &&

                   PartnerId.Equals(SetEVSEBusyStatusRequest.PartnerId) &&
                   OperatorId.Equals(SetEVSEBusyStatusRequest.OperatorId) &&
                   EVSEId.Equals(SetEVSEBusyStatusRequest.EVSEId) &&
                   StatusEventDate.Equals(SetEVSEBusyStatusRequest.StatusEventDate) &&
                   BusyStatus.Equals(SetEVSEBusyStatusRequest.BusyStatus) &&

                   ((!BusyStatusUntil.HasValue && !SetEVSEBusyStatusRequest.BusyStatusUntil.HasValue) ||
                    (BusyStatusUntil.HasValue && SetEVSEBusyStatusRequest.BusyStatusUntil.HasValue && BusyStatusUntil.Value.Equals(SetEVSEBusyStatusRequest.BusyStatusUntil.Value))) &&

                   ((!BusyStatusComment.IsNeitherNullNorEmpty() && !SetEVSEBusyStatusRequest.BusyStatusComment.IsNeitherNullNorEmpty()) ||
                    (BusyStatusComment.IsNeitherNullNorEmpty() && SetEVSEBusyStatusRequest.BusyStatusComment.IsNeitherNullNorEmpty() && BusyStatusComment.Equals(SetEVSEBusyStatusRequest.BusyStatusComment))));
        }