/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // Overflow is fine, just wrap unchecked { var hashCode = 41; // Suitable nullity checks etc, of course :) #pragma warning disable CA1307 // Specify StringComparison // ReSharper disable once NonReadonlyMemberInGetHashCode if (Title != null) { // ReSharper disable once NonReadonlyMemberInGetHashCode hashCode = (hashCode * 59) + Title.GetHashCode(); } // ReSharper disable once NonReadonlyMemberInGetHashCode if (Description != null) { // ReSharper disable once NonReadonlyMemberInGetHashCode hashCode = (hashCode * 59) + Description.GetHashCode(); } // ReSharper disable once NonReadonlyMemberInGetHashCode if (SlidesUrl != null) { // ReSharper disable once NonReadonlyMemberInGetHashCode hashCode = (hashCode * 59) + SlidesUrl.GetHashCode(); } // ReSharper disable once NonReadonlyMemberInGetHashCode if (VideoUrl != null) { // ReSharper disable once NonReadonlyMemberInGetHashCode hashCode = (hashCode * 59) + VideoUrl.GetHashCode(); } // ReSharper disable once NonReadonlyMemberInGetHashCode if (MeetupIds != null) { // ReSharper disable once NonReadonlyMemberInGetHashCode hashCode = (hashCode * 59) + MeetupIds.GetHashCode(); } // ReSharper disable once NonReadonlyMemberInGetHashCode if (SpeakerIds != null) { // ReSharper disable once NonReadonlyMemberInGetHashCode hashCode = (hashCode * 59) + SpeakerIds.GetHashCode(); } #pragma warning restore CA1307 // Specify StringComparison return(hashCode); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // Overflow is fine, just wrap unchecked { var hashCode = 41; // Suitable nullity checks etc, of course :) #pragma warning disable CA1307 // Specify StringComparison // ReSharper disable once NonReadonlyMemberInGetHashCode if (Id != null) { // ReSharper disable once NonReadonlyMemberInGetHashCode hashCode = (hashCode * 59) + Id.GetHashCode(); } // ReSharper disable once NonReadonlyMemberInGetHashCode if (Time != null) { // ReSharper disable once NonReadonlyMemberInGetHashCode hashCode = (hashCode * 59) + Time.GetHashCode(); } // ReSharper disable once NonReadonlyMemberInGetHashCode if (SlidesUrl != null) { // ReSharper disable once NonReadonlyMemberInGetHashCode hashCode = (hashCode * 59) + SlidesUrl.GetHashCode(); } // ReSharper disable once NonReadonlyMemberInGetHashCode if (VideoUrl != null) { // ReSharper disable once NonReadonlyMemberInGetHashCode hashCode = (hashCode * 59) + VideoUrl.GetHashCode(); } // ReSharper disable once NonReadonlyMemberInGetHashCode if (Comment != null) { // ReSharper disable once NonReadonlyMemberInGetHashCode hashCode = (hashCode * 59) + Comment.GetHashCode(); } #pragma warning restore CA1307 // Specify StringComparison return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (videoId_ != null) { hash ^= VideoId.GetHashCode(); } if (timestamp_ != null) { hash ^= Timestamp.GetHashCode(); } if (VideoUrl.Length != 0) { hash ^= VideoUrl.GetHashCode(); } if (ThumbnailUrl.Length != 0) { hash ^= ThumbnailUrl.GetHashCode(); } return(hash); }
public override int GetHashCode() { return(VideoUrl.GetHashCode()); }