Example #1
0
        /// <inheritdoc />
        /// <summary>
        /// Returns true if MeetupDraft instances are equal
        /// </summary>
        /// <param name="other">Instance of MeetupDraft to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(MeetupDraft 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(Name, other.Name) ||
                     (Name != null && Name.Equals(other.Name))
                 ) &&
                 (
                     // ReSharper disable once RedundantNameQualifier
                     string.Equals(Venue, other.Venue) ||
                     (Venue != null && Venue.Equals(other.Venue))
                 ) &&
                 (
                     Speakers == other.Speakers ||
                     (Speakers != null && Speakers.SequenceEqual(other.Speakers))
                 ) &&
                 (
                     Talks == other.Talks ||
                     (Talks != null && Talks.SequenceEqual(other.Talks))
                 ) &&
                 (
                     Friends == other.Friends ||
                     (Friends != null && Friends.SequenceEqual(other.Friends))
                 ));

#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
        }
Example #2
0
        /// <inheritdoc />
        /// <summary>
        /// Returns true if SpeakerDraft instances are equal
        /// </summary>
        /// <param name="other">Instance of SpeakerDraft to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SpeakerDraft 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(FirstName, other.FirstName) ||
                     (FirstName != null && FirstName.Equals(other.FirstName))
                 ) &&
                 (
                     // ReSharper disable once RedundantNameQualifier
                     string.Equals(LastName, other.LastName) ||
                     (LastName != null && LastName.Equals(other.LastName))
                 ) &&
                 (
                     // ReSharper disable once RedundantNameQualifier
                     string.Equals(CompanyName, other.CompanyName) ||
                     (CompanyName != null && CompanyName.Equals(other.CompanyName))
                 ) &&
                 (
                     // ReSharper disable once RedundantNameQualifier
                     string.Equals(CompanyUrl, other.CompanyUrl) ||
                     (CompanyUrl != null && CompanyUrl.Equals(other.CompanyUrl))
                 ) &&
                 (
                     // ReSharper disable once RedundantNameQualifier
                     string.Equals(Description, other.Description) ||
                     (Description != null && Description.Equals(other.Description))
                 ) &&
                 (
                     // ReSharper disable once RedundantNameQualifier
                     string.Equals(BlogsUrl, other.BlogsUrl) ||
                     (BlogsUrl != null && BlogsUrl.Equals(other.BlogsUrl))
                 ) &&
                 (
                     // ReSharper disable once RedundantNameQualifier
                     string.Equals(ContactsUrl, other.ContactsUrl) ||
                     (ContactsUrl != null && ContactsUrl.Equals(other.ContactsUrl))
                 ) &&
                 (
                     // ReSharper disable once RedundantNameQualifier
                     string.Equals(TwitterUrl, other.TwitterUrl) ||
                     (TwitterUrl != null && TwitterUrl.Equals(other.TwitterUrl))
                 ) &&
                 (
                     // ReSharper disable once RedundantNameQualifier
                     string.Equals(HabrUrl, other.HabrUrl) ||
                     (HabrUrl != null && HabrUrl.Equals(other.HabrUrl))
                 ) &&
                 (
                     // ReSharper disable once RedundantNameQualifier
                     string.Equals(GitHubUrl, other.GitHubUrl) ||
                     (GitHubUrl != null && GitHubUrl.Equals(other.GitHubUrl))
                 ) &&
                 (
                     Meetups == other.Meetups ||
                     (Meetups != null && Meetups.SequenceEqual(other.Meetups))
                 ) &&
                 (
                     Venues == other.Venues ||
                     (Venues != null && Venues.SequenceEqual(other.Venues))
                 ) &&
                 (
                     Talks == other.Talks ||
                     (Talks != null && Talks.SequenceEqual(other.Talks))
                 ) &&
                 (
                     Friends == other.Friends ||
                     (Friends != null && Friends.SequenceEqual(other.Friends))
                 ));

#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
        }