コード例 #1
0
ファイル: View.cs プロジェクト: akutruff/Couchbase.Net
        internal View(CouchbaseClient client, string document, string name)
        {
            Document = document;
            Name = name;

            _client = client;

            _viewUriPath = "default/_design/" + document + "/_view/" + name;
        }
コード例 #2
0
        public static CouchbaseClient Connect(string bucketName, int millisecondsToWaitForVBucketMap, params Server[] servers)
        {
            CouchbaseClient client;
            try
            {
                client = new CouchbaseClient(bucketName, servers);
            }
            catch (Exception e)
            {
                throw new Exception("Failed to connect client", e);
            }

            if (!client.WaitForInitialClusterUpdate(millisecondsToWaitForVBucketMap))
            {
                throw new TimeoutException("Timeout expired while waiting for vbucket map.");
            }

            return client;
        }