Ejemplo n.º 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 (Phoneid != null)
         {
             hashCode = hashCode * 59 + Phoneid.GetHashCode();
         }
         if (FeedbackType != null)
         {
             hashCode = hashCode * 59 + FeedbackType.GetHashCode();
         }
         if (FeedbackValue != null)
         {
             hashCode = hashCode * 59 + FeedbackValue.GetHashCode();
         }
         if (FeedbackMessage != null)
         {
             hashCode = hashCode * 59 + FeedbackMessage.GetHashCode();
         }
         if (FeedbackLat != null)
         {
             hashCode = hashCode * 59 + FeedbackLat.GetHashCode();
         }
         if (FeedbackLon != null)
         {
             hashCode = hashCode * 59 + FeedbackLon.GetHashCode();
         }
         return(hashCode);
     }
 }
        /// <summary>
        /// Returns true if PublicFeedback instances are equal
        /// </summary>
        /// <param name="other">Instance of PublicFeedback to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PublicFeedback other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Phoneid == other.Phoneid ||
                     Phoneid != null &&
                     Phoneid.Equals(other.Phoneid)
                     ) &&
                 (
                     FeedbackType == other.FeedbackType ||
                     FeedbackType != null &&
                     FeedbackType.Equals(other.FeedbackType)
                 ) &&
                 (
                     FeedbackValue == other.FeedbackValue ||
                     FeedbackValue != null &&
                     FeedbackValue.Equals(other.FeedbackValue)
                 ));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Returns true if ProAcousticFeedback instances are equal
        /// </summary>
        /// <param name="other">Instance of ProAcousticFeedback to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ProAcousticFeedback other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Phoneid == other.Phoneid ||
                     Phoneid != null &&
                     Phoneid.Equals(other.Phoneid)
                     ) &&
                 (
                     FeedbackType == other.FeedbackType ||
                     FeedbackType != null &&
                     FeedbackType.Equals(other.FeedbackType)
                 ) &&
                 (
                     FeedbackValue == other.FeedbackValue ||
                     FeedbackValue != null &&
                     FeedbackValue.Equals(other.FeedbackValue)
                 ) &&
                 (
                     FeedbackMessage == other.FeedbackMessage ||
                     FeedbackMessage != null &&
                     FeedbackMessage.Equals(other.FeedbackMessage)
                 ) &&
                 (
                     FeedbackLat == other.FeedbackLat ||
                     FeedbackLat != null &&
                     FeedbackLat.Equals(other.FeedbackLat)
                 ) &&
                 (
                     FeedbackLon == other.FeedbackLon ||
                     FeedbackLon != null &&
                     FeedbackLon.Equals(other.FeedbackLon)
                 ));
        }