Пример #1
0
        internal static bool Equals(ProxyHttpRequestOptions options1, ProxyHttpRequestOptions options2)
        {
            if (options1 == null && options2 == null)
            {
                return(true);
            }

            if (options1 == null || options2 == null)
            {
                return(false);
            }

            return(options1.Timeout == options2.Timeout &&
                   options1.Version == options2.Version
#if NET
                   && options1.VersionPolicy == options2.VersionPolicy
#endif
                   );
        }
Пример #2
0
        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) &&
                   LoadBalancingOptions.Equals(cluster1.LoadBalancing, cluster2.LoadBalancing) &&
                   SessionAffinityOptions.Equals(cluster1.SessionAffinity, cluster2.SessionAffinity) &&
                   HealthCheckOptions.Equals(cluster1.HealthCheck, cluster2.HealthCheck) &&
                   ProxyHttpClientOptions.Equals(cluster1.HttpClient, cluster2.HttpClient) &&
                   ProxyHttpRequestOptions.Equals(cluster1.HttpRequest, cluster2.HttpRequest) &&
                   CaseInsensitiveEqualHelper.Equals(cluster1.Destinations, cluster2.Destinations, Destination.Equals) &&
                   CaseInsensitiveEqualHelper.Equals(cluster1.Metadata, cluster2.Metadata));
        }