コード例 #1
0
        public ICheck ToCheck()
        {
            var settings = new CouchbaseClusterSettings
            {
                ServerUrl = ServerUrl
            };

            return(new ServerAvailabilityCheck(new AuthorizedHttpClientFactory(Credentials), settings));
        }
コード例 #2
0
        public ServerAvailabilityCheck(IHttpClientFactory httpClientFactory, CouchbaseClusterSettings settings)
        {
            if (settings == null || settings.AreBasicSettingsEmpty)
            {
                throw new ArgumentException(nameof(settings));
            }

            _httpClientFactory = httpClientFactory;
            _settings          = settings;
        }
コード例 #3
0
        public ICheck ToCheck()
        {
            var settings = new CouchbaseClusterSettings
            {
                ServerUrl = ServerUrl
            };

            if (!string.IsNullOrEmpty(PoolName))
            {
                settings.PoolName = PoolName;
            }

            return(new PoolAvailabilityCheck(new AuthorizedHttpClientFactory(Credentials), settings));
        }