using System; using System.Collections.Generic; using System.Threading; using Couchbase; using Couchbase.Configuration.Client; using Couchbase.Core; using Couchbase.Management; namespace ForumQuestions { public class Program { public static IBucket Bucket { get; set; } static void Main(string[] args) { var cluster = new Cluster(new ClientConfiguration { Servers = new List { new Uri("http://localhost:8091") } }); cluster.Authenticate("Administrator", "password"); Bucket = cluster.OpenBucket("BucketName"); Bucket.ListAppend("mylist", new {foo = "bar"}, true); Bucket.MapAdd("mymap", "foo", "bar", true); Bucket.QueuePush("myqueue", new {baz = "qux"}, true); Thread.Sleep(5000); if(!Bucket.Exists("mylist")) Console.WriteLine("mylist doesn't exist"); if(!Bucket.Exists("mymap")) Console.WriteLine("mymap doesn't exist"); if(!Bucket.Exists("myqueue")) Console.WriteLine("myqueue doesn't exist"); cluster.Dispose(); } } }