コード例 #1
0
        private static Microsoft.ReverseProxy.Abstractions.PassiveHealthCheckOptions CreatePassiveHealthCheckOptions(PassiveHealthCheckOptions passiveHealthCheckOptions)
        {
            if (passiveHealthCheckOptions is null)
            {
                return(null);
            }

            return(new Microsoft.ReverseProxy.Abstractions.PassiveHealthCheckOptions
            {
                Enabled = passiveHealthCheckOptions.Enabled ?? false,
                Policy = passiveHealthCheckOptions.Policy,
                ReactivationPeriod = passiveHealthCheckOptions.ReactivationPeriod.ReadTimeSpan()
            });
        }
コード例 #2
0
        private static Yarp.ReverseProxy.Configuration.PassiveHealthCheckConfig?CreatePassiveHealthCheckOptions(PassiveHealthCheckOptions passiveHealthCheckOptions)
        {
            if (passiveHealthCheckOptions is null)
            {
                return(null);
            }

            return(new Yarp.ReverseProxy.Configuration.PassiveHealthCheckConfig
            {
                Enabled = passiveHealthCheckOptions.Enabled,
                Policy = passiveHealthCheckOptions.Policy,
                ReactivationPeriod = passiveHealthCheckOptions.ReactivationPeriod.ReadTimeSpan()
            });
        }