示例#1
0
        internal static bool Equals(HealthCheckOptions options1, HealthCheckOptions options2)
        {
            if (options1 == null && options2 == null)
            {
                return(true);
            }

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

            return(PassiveHealthCheckOptions.Equals(options1.Passive, options2.Passive) &&
                   ActiveHealthCheckOptions.Equals(options1.Active, options2.Active));
        }
        internal static bool Equals(ActiveHealthCheckOptions options1, ActiveHealthCheckOptions options2)
        {
            if (options1 == null && options2 == null)
            {
                return(true);
            }

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

            return(options1.Enabled == options2.Enabled &&
                   options1.Interval == options2.Interval &&
                   options1.Timeout == options2.Timeout &&
                   string.Equals(options1.Policy, options2.Policy, StringComparison.OrdinalIgnoreCase) &&
                   string.Equals(options1.Path, options2.Path, StringComparison.OrdinalIgnoreCase));
        }