Exemplo n.º 1
0
        internal static bool Equals(ProxyHttpClientOptions options1, ProxyHttpClientOptions options2)
        {
            if (options1 == null && options2 == null)
            {
                return(true);
            }

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

            return(options1.SslProtocols == options2.SslProtocols &&
                   Equals(options1.ClientCertificate, options2.ClientCertificate) &&
                   options1.DangerousAcceptAnyServerCertificate == options2.DangerousAcceptAnyServerCertificate &&
                   options1.MaxConnectionsPerServer == options2.MaxConnectionsPerServer);
        }
Exemplo n.º 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));
        }