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

            return
                ((
                     TicketEventID == other.TicketEventID ||
                     TicketEventID != null &&
                     TicketEventID.Equals(other.TicketEventID)
                     ) &&
                 (
                     EventName == other.EventName ||
                     EventName != null &&
                     EventName.Equals(other.EventName)
                 ) &&
                 (
                     EventHtmlDescription == other.EventHtmlDescription ||
                     EventHtmlDescription != null &&
                     EventHtmlDescription.Equals(other.EventHtmlDescription)
                 ) &&
                 (
                     EventImagePath == other.EventImagePath ||
                     EventImagePath != null &&
                     EventImagePath.Equals(other.EventImagePath)
                 ));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returns true if EventDate instances are equal
        /// </summary>
        /// <param name="other">Instance of EventDate to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(EventDate other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     TicketEventDateID == other.TicketEventDateID ||
                     TicketEventDateID != null &&
                     TicketEventDateID.Equals(other.TicketEventDateID)
                     ) &&
                 (
                     TicketEventID == other.TicketEventID ||
                     TicketEventID != null &&
                     TicketEventID.Equals(other.TicketEventID)
                 ) &&
                 (
                     VenueID == other.VenueID ||
                     VenueID != null &&
                     VenueID.Equals(other.VenueID)
                 ) &&
                 (
                     EventStartDateTime == other.EventStartDateTime ||
                     EventStartDateTime != null &&
                     EventStartDateTime.Equals(other.EventStartDateTime)
                 ) &&
                 (
                     MaxTickets == other.MaxTickets ||
                     MaxTickets != null &&
                     MaxTickets.Equals(other.MaxTickets)
                 ) &&
                 (
                     Price == other.Price ||
                     Price != null &&
                     Price.Equals(other.Price)
                 ));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Returns true if EventDate instances are equal
        /// </summary>
        /// <param name="other">Instance of EventDate to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(FullEventDate other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     TicketEventDateID == other.TicketEventDateID ||
                     TicketEventDateID != null &&
                     TicketEventDateID.Equals(other.TicketEventDateID)
                     ) &&
                 (
                     TicketEventID == other.TicketEventID ||
                     TicketEventID != null &&
                     TicketEventID.Equals(other.TicketEventID)
                 ) &&
                 (
                     EventName == other.EventName ||
                     EventName != null &&
                     EventName.Equals(other.EventName)
                 ) &&
                 (
                     EventHtmlDescription == other.EventHtmlDescription ||
                     EventHtmlDescription != null &&
                     EventHtmlDescription.Equals(other.EventHtmlDescription)
                 ) &&
                 (
                     EventImagePath == other.EventImagePath ||
                     EventImagePath != null &&
                     EventImagePath.Equals(other.EventImagePath)
                 ) &&
                 (
                     VenueID == other.VenueID ||
                     VenueID != null &&
                     VenueID.Equals(other.VenueID)
                 ) &&
                 (
                     VenueName == other.VenueName ||
                     VenueName != null &&
                     VenueName.Equals(other.VenueName)
                 ) &&
                 (
                     Address == other.Address ||
                     Address != null &&
                     Address.Equals(other.Address)
                 ) &&
                 (
                     City == other.City ||
                     City != null &&
                     City.Equals(other.City)
                 ) &&
                 (
                     Country == other.Country ||
                     Country != null &&
                     Country.Equals(other.Country)
                 ) &&
                 (
                     EventStartDateTime == other.EventStartDateTime ||
                     EventStartDateTime != null &&
                     EventStartDateTime.Equals(other.EventStartDateTime)
                 ) &&
                 (
                     MaxTickets == other.MaxTickets ||
                     MaxTickets != null &&
                     MaxTickets.Equals(other.MaxTickets)
                 ) &&
                 (
                     Price == other.Price ||
                     Price != null &&
                     Price.Equals(other.Price)
                 ));
        }