/// <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 (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (Category != null)
         {
             hashCode = hashCode * 59 + Category.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (PhotoUrls != null)
         {
             hashCode = hashCode * 59 + PhotoUrls.GetHashCode();
         }
         if (Tags != null)
         {
             hashCode = hashCode * 59 + Tags.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemple #2
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     // credit: http://stackoverflow.com/a/263416/677735
     unchecked // Overflow is fine, just wrap
     {
         var hash = 41;
         // Suitable nullity checks etc, of course :)
         if (Id != null)
         {
             hash = hash * 59 + Id.GetHashCode();
         }
         if (Category != null)
         {
             hash = hash * 59 + Category.GetHashCode();
         }
         if (Name != null)
         {
             hash = hash * 59 + Name.GetHashCode();
         }
         if (PhotoUrls != null)
         {
             hash = hash * 59 + PhotoUrls.GetHashCode();
         }
         if (Tags != null)
         {
             hash = hash * 59 + Tags.GetHashCode();
         }
         if (Status != null)
         {
             hash = hash * 59 + Status.GetHashCode();
         }
         return(hash);
     }
 }