/// <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); } }
/// <inheritdoc /> /// <summary> /// Returns true if UpdateTalkDraftParameters instances are equal /// </summary> /// <param name="other">Instance of UpdateTalkDraftParameters to be compared</param> /// <returns>Boolean</returns> public bool Equals(UpdateTalkDraftParameters other) { #pragma warning disable IDE0041 // Use 'is null' check if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } #pragma warning disable CA1309 // Use ordinal stringcomparison #pragma warning disable CA1307 // Specify StringComparison #pragma warning disable SA1515 // Single-line comment must be preceded by blank line #pragma warning disable SA1009 // Closing parenthesis must be spaced correctly return (#pragma warning disable SA1119 // Statement must not use unnecessary parenthesis ( // ReSharper disable once RedundantNameQualifier string.Equals(Title, other.Title) || (Title != null && Title.Equals(other.Title)) ) && ( // ReSharper disable once RedundantNameQualifier string.Equals(Description, other.Description) || (Description != null && Description.Equals(other.Description)) ) && ( // ReSharper disable once RedundantNameQualifier string.Equals(SlidesUrl, other.SlidesUrl) || (SlidesUrl != null && SlidesUrl.Equals(other.SlidesUrl)) ) && ( // ReSharper disable once RedundantNameQualifier string.Equals(VideoUrl, other.VideoUrl) || (VideoUrl != null && VideoUrl.Equals(other.VideoUrl)) ) && ( MeetupIds == other.MeetupIds || (MeetupIds != null && MeetupIds.SequenceEqual(other.MeetupIds)) ) && ( SpeakerIds == other.SpeakerIds || (SpeakerIds != null && SpeakerIds.SequenceEqual(other.SpeakerIds)) )); #pragma warning restore SA1119 // Statement must not use unnecessary parenthesis #pragma warning restore SA1009 // Closing parenthesis must be spaced correctly #pragma warning restore SA1515 // Single-line comment must be preceded by blank line #pragma warning restore CA1307 // Specify StringComparison #pragma warning restore CA1309 // Use ordinal stringcomparison }
/// <inheritdoc /> /// <summary> /// Returns true if TalkRehearsal instances are equal /// </summary> /// <param name="other">Instance of TalkRehearsal to be compared</param> /// <returns>Boolean</returns> public bool Equals(TalkRehearsal other) { #pragma warning disable IDE0041 // Use 'is null' check if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } #pragma warning disable CA1309 // Use ordinal stringcomparison #pragma warning disable CA1307 // Specify StringComparison #pragma warning disable SA1515 // Single-line comment must be preceded by blank line #pragma warning disable SA1009 // Closing parenthesis must be spaced correctly return (#pragma warning disable SA1119 // Statement must not use unnecessary parenthesis ( // ReSharper disable once RedundantNameQualifier string.Equals(Id, other.Id) || (Id != null && Id.Equals(other.Id)) ) && ( // ReSharper disable once RedundantNameQualifier string.Equals(Time, other.Time) || (Time != null && Time.Equals(other.Time)) ) && ( // ReSharper disable once RedundantNameQualifier string.Equals(SlidesUrl, other.SlidesUrl) || (SlidesUrl != null && SlidesUrl.Equals(other.SlidesUrl)) ) && ( // ReSharper disable once RedundantNameQualifier string.Equals(VideoUrl, other.VideoUrl) || (VideoUrl != null && VideoUrl.Equals(other.VideoUrl)) ) && ( // ReSharper disable once RedundantNameQualifier string.Equals(Comment, other.Comment) || (Comment != null && Comment.Equals(other.Comment)) )); #pragma warning restore SA1119 // Statement must not use unnecessary parenthesis #pragma warning restore SA1009 // Closing parenthesis must be spaced correctly #pragma warning restore SA1515 // Single-line comment must be preceded by blank line #pragma warning restore CA1307 // Specify StringComparison #pragma warning restore CA1309 // Use ordinal stringcomparison }
/// <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); } }