public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj))
            {
                return(false);
            }
            if (ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (obj.GetType() != GetType())
            {
                return(false);
            }

            var other = (ServiceDiscoveryConfig)obj;

            return(Scope == other.Scope &&
                   RequestTimeout.Equals(other.RequestTimeout) &&
                   FirstAttemptDelaySeconds.Equals(other.FirstAttemptDelaySeconds) &&
                   MaxAttemptDelaySeconds.Equals(other.MaxAttemptDelaySeconds) &&
                   DelayMultiplier.Equals(other.DelayMultiplier) &&
                   Source == other.Source &&
                   string.Equals(Hosts, other.Hosts) &&
                   DefaultPort == other.DefaultPort &&
                   DefaultSlotNumber == other.DefaultSlotNumber &&
                   UseHttpsOverride == other.UseHttpsOverride &&
                   string.Equals(SecurityRole, other.SecurityRole) &&
                   Equals(CachingPolicy, other.CachingPolicy) &&
                   SuppressHealthCheckAfterServiceUnused.Equals(other.SuppressHealthCheckAfterServiceUnused));
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Scope.GetHashCode();
         hashCode = (hashCode * 397) ^ RequestTimeout.GetHashCode();
         hashCode = (hashCode * 397) ^ FirstAttemptDelaySeconds.GetHashCode();
         hashCode = (hashCode * 397) ^ MaxAttemptDelaySeconds.GetHashCode();
         hashCode = (hashCode * 397) ^ DelayMultiplier.GetHashCode();
         hashCode = (hashCode * 397) ^ Source.GetHashCode();
         hashCode = (hashCode * 397) ^ (Hosts != null ? Hosts.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ DefaultPort.GetHashCode();
         hashCode = (hashCode * 397) ^ DefaultSlotNumber.GetHashCode();
         hashCode = (hashCode * 397) ^ UseHttpsOverride.GetHashCode();
         hashCode = (hashCode * 397) ^ (SecurityRole != null ? SecurityRole.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CachingPolicy != null ? CachingPolicy.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ SuppressHealthCheckAfterServiceUnused.GetHashCode();
         return(hashCode);
     }
 }