internal static bool Equals(ClusterPartitioningOptions options1, ClusterPartitioningOptions options2) { if (options1 == null && options2 == null) { return(true); } if (options1 == null || options2 == null) { return(false); } return(options1.PartitionCount == options2.PartitionCount && string.Equals(options1.PartitionKeyExtractor, options2.PartitionKeyExtractor, StringComparison.OrdinalIgnoreCase) && string.Equals(options1.PartitioningAlgorithm, options2.PartitioningAlgorithm, StringComparison.OrdinalIgnoreCase)); }
internal static bool Equals(Cluster cluster1, Cluster cluster2) { if (cluster1 == null && cluster2 == null) { return(true); } if (cluster1 == null || cluster2 == null) { return(false); } return(string.Equals(cluster1.Id, cluster2.Id, StringComparison.OrdinalIgnoreCase) && CircuitBreakerOptions.Equals(cluster1.CircuitBreaker, cluster2.CircuitBreaker) && QuotaOptions.Equals(cluster1.Quota, cluster2.Quota) && ClusterPartitioningOptions.Equals(cluster1.Partitioning, cluster2.Partitioning) && LoadBalancingOptions.Equals(cluster1.LoadBalancing, cluster2.LoadBalancing) && SessionAffinityOptions.Equals(cluster1.SessionAffinity, cluster2.SessionAffinity) && HealthCheckOptions.Equals(cluster1.HealthCheck, cluster2.HealthCheck) && ProxyHttpClientOptions.Equals(cluster1.HttpClient, cluster2.HttpClient) && CaseInsensitiveEqualHelper.Equals(cluster1.Destinations, cluster2.Destinations, Destination.Equals) && CaseInsensitiveEqualHelper.Equals(cluster1.Metadata, cluster2.Metadata)); }