コード例 #1
0
        public static HealthMonitorPushClient UsingHealthMonitor(string healthMonitorUrl)
        {
            if (healthMonitorUrl == null)
                throw new ArgumentNullException(nameof(healthMonitorUrl));

            HealthMonitorClient client = null;
            if (!string.IsNullOrWhiteSpace(healthMonitorUrl))
                client = new HealthMonitorClient(healthMonitorUrl);
            else
                _logger.Warn("Health Monitor Integration would be skipped (HealthMonitor URL is empty)...");

            return new HealthMonitorPushClient(client, new DefaultTimeCoordinator());
        }
コード例 #2
0
        public static HealthMonitorPushClient UsingHealthMonitor(string healthMonitorUrl)
        {
            if (healthMonitorUrl == null)
            {
                throw new ArgumentNullException(nameof(healthMonitorUrl));
            }

            HealthMonitorClient client = null;

            if (!string.IsNullOrWhiteSpace(healthMonitorUrl))
            {
                client = new HealthMonitorClient(healthMonitorUrl);
            }
            else
            {
                _logger.Warn("Health Monitor Integration would be skipped (HealthMonitor URL is empty)...");
            }

            return(new HealthMonitorPushClient(client, new DefaultTimeCoordinator()));
        }