Example #1
0
        /// <summary>
        /// Returns true if BookingConfirmedEvent instances are equal
        /// </summary>
        /// <param name="other">Instance of BookingConfirmedEvent to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(BookingConfirmedEvent other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     BookingRequestId == other.BookingRequestId ||
                     BookingRequestId != null &&
                     BookingRequestId.Equals(other.BookingRequestId)
                     ) &&
                 (
                     BookingId == other.BookingId ||
                     BookingId != null &&
                     BookingId.Equals(other.BookingId)
                 ) &&
                 (
                     AgencyId == other.AgencyId ||
                     AgencyId != null &&
                     AgencyId.Equals(other.AgencyId)
                 ) &&
                 (
                     Cost == other.Cost ||

                     Cost.Equals(other.Cost)
                 ));
        }
Example #2
0
        /// <summary>
        /// Returns true if BookingResponse instances are equal
        /// </summary>
        /// <param name="other">Instance of BookingResponse to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(BookingResponse other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     DutyId == other.DutyId ||
                     DutyId != null &&
                     DutyId.Equals(other.DutyId)
                     ) &&
                 (
                     BookingId == other.BookingId ||
                     BookingId != null &&
                     BookingId.Equals(other.BookingId)
                 ) &&
                 (
                     AllocatePersonId == other.AllocatePersonId ||
                     AllocatePersonId != null &&
                     AllocatePersonId.Equals(other.AllocatePersonId)
                 ) &&
                 (
                     MasterDutyId == other.MasterDutyId ||
                     MasterDutyId != null &&
                     MasterDutyId.Equals(other.MasterDutyId)
                 ) &&
                 (
                     SlaveDutyId == other.SlaveDutyId ||
                     SlaveDutyId != null &&
                     SlaveDutyId.Equals(other.SlaveDutyId)
                 ));
        }