/// <summary>
        ///     Returns true if MarketFilter instances are equal
        /// </summary>
        /// <param name="other">Instance of MarketFilter to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(MarketFilter other)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            if (other == null)
            {
                return(false);
            }

            return((CountryCodes == other.CountryCodes || CountryCodes != null && CountryCodes.SequenceEqual(other.CountryCodes)) &&
                   (BettingTypes == other.BettingTypes || BettingTypes != null && BettingTypes.SequenceEqual(other.BettingTypes)) &&
                   (TurnInPlayEnabled == other.TurnInPlayEnabled || TurnInPlayEnabled != null && TurnInPlayEnabled.Equals(other.TurnInPlayEnabled)) &&
                   (MarketTypes == other.MarketTypes || MarketTypes != null && MarketTypes.SequenceEqual(other.MarketTypes)) &&
                   (Venues == other.Venues || Venues != null && Venues.SequenceEqual(other.Venues)) &&
                   (MarketIds == other.MarketIds || MarketIds != null && MarketIds.SequenceEqual(other.MarketIds)) &&
                   (EventTypeIds == other.EventTypeIds || EventTypeIds != null && EventTypeIds.SequenceEqual(other.EventTypeIds)) &&
                   (EventIds == other.EventIds || EventIds != null && EventIds.SequenceEqual(other.EventIds)) &&
                   (BspMarket == other.BspMarket || BspMarket != null && BspMarket.Equals(other.BspMarket)));
        }
Exemplo n.º 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
        }