/// <summary> /// Compares two charge detail records for equality. /// </summary> /// <param name="ChargeDetailRecord">A charge detail record to compare with.</param> /// <returns>True if both match; False otherwise.</returns> public Boolean Equals(ChargeDetailRecord ChargeDetailRecord) { if ((Object)ChargeDetailRecord == null) { return(false); } return(CDRNature.Equals(ChargeDetailRecord.CDRNature) && ServiceSessionId.Equals(ChargeDetailRecord.ServiceSessionId) && RequestedServiceId.Equals(ChargeDetailRecord.RequestedServiceId) && EVSEId.Equals(ChargeDetailRecord.EVSEId) && UserContractIdAlias.Equals(ChargeDetailRecord.UserContractIdAlias) && UserId.Equals(ChargeDetailRecord.UserId) && StartTime.Equals(ChargeDetailRecord.StartTime) && EndTime.Equals(ChargeDetailRecord.EndTime) && ExecPartnerSessionId.Equals(ChargeDetailRecord.ExecPartnerSessionId) && ExecPartnerOperatorId.Equals(ChargeDetailRecord.ExecPartnerOperatorId) && SalesPartnerSessionId.Equals(ChargeDetailRecord.SalesPartnerSessionId) && SalesPartnerOperatorId.Equals(ChargeDetailRecord.SalesPartnerOperatorId) && PartnerProductId.Equals(ChargeDetailRecord.PartnerProductId) && MeterReports.Equals(ChargeDetailRecord.MeterReports)); }
/// <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)))); }