Пример #1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (TicketEventDateID != null)
         {
             hashCode = hashCode * 59 + TicketEventDateID.GetHashCode();
         }
         if (TicketEventID != null)
         {
             hashCode = hashCode * 59 + TicketEventID.GetHashCode();
         }
         if (VenueID != null)
         {
             hashCode = hashCode * 59 + VenueID.GetHashCode();
         }
         if (EventStartDateTime != null)
         {
             hashCode = hashCode * 59 + EventStartDateTime.GetHashCode();
         }
         if (MaxTickets != null)
         {
             hashCode = hashCode * 59 + MaxTickets.GetHashCode();
         }
         if (Price != null)
         {
             hashCode = hashCode * 59 + Price.GetHashCode();
         }
         return(hashCode);
     }
 }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (TicketID != null)
             hashCode = hashCode * 59 + TicketID.GetHashCode();
         if (TicketEventDateID != null)
             hashCode = hashCode * 59 + TicketEventDateID.GetHashCode();
         return hashCode;
     }
 }
Пример #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(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)
                 ));
        }
        /// <summary>
        /// Returns true if Ticket instances are equal
        /// </summary>
        /// <param name="other">Instance of Ticket to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Ticket other)
        {
            if (ReferenceEquals(null, other))
                return false;
            if (ReferenceEquals(this, other))
                return true;

            return
                (
                    TicketID == other.TicketID ||
                    TicketID != null &&
                    TicketID.Equals(other.TicketID)
                ) &&
                (
                    TicketEventDateID == other.TicketEventDateID ||
                    TicketEventDateID != null &&
                    TicketEventDateID.Equals(other.TicketEventDateID)
                );
        }
Пример #5
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (TicketEventDateID != null)
         {
             hashCode = hashCode * 59 + TicketEventDateID.GetHashCode();
         }
         if (TicketEventID != null)
         {
             hashCode = hashCode * 59 + TicketEventID.GetHashCode();
         }
         if (EventName != null)
         {
             hashCode = hashCode * 59 + EventName.GetHashCode();
         }
         if (EventHtmlDescription != null)
         {
             hashCode = hashCode * 59 + EventHtmlDescription.GetHashCode();
         }
         if (EventImagePath != null)
         {
             hashCode = hashCode * 59 + EventImagePath.GetHashCode();
         }
         if (VenueID != null)
         {
             hashCode = hashCode * 59 + VenueID.GetHashCode();
         }
         if (VenueName != null)
         {
             hashCode = hashCode * 59 + VenueName.GetHashCode();
         }
         if (Address != null)
         {
             hashCode = hashCode * 59 + Address.GetHashCode();
         }
         if (City != null)
         {
             hashCode = hashCode * 59 + City.GetHashCode();
         }
         if (Country != null)
         {
             hashCode = hashCode * 59 + Country.GetHashCode();
         }
         if (EventStartDateTime != null)
         {
             hashCode = hashCode * 59 + EventStartDateTime.GetHashCode();
         }
         if (MaxTickets != null)
         {
             hashCode = hashCode * 59 + MaxTickets.GetHashCode();
         }
         if (Price != null)
         {
             hashCode = hashCode * 59 + Price.GetHashCode();
         }
         return(hashCode);
     }
 }
Пример #6
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)
                 ));
        }