public NotificationManager(ISettingsController aSettingsController){ theCouchClient = new CouchClient(aSettingsController.Host, aSettingsController.Port, aSettingsController.Username, aSettingsController.Password); theCouchDatabase = theCouchClient.GetDatabase(aSettingsController.DatabaseName); theOptions = new ChangeOptions(); theOptions.Heartbeat = 10000; theOptions.Since = GetSequence(); }
public static dynamic RetrieveById(string id) { var cli = new CouchClient(); var db = cli.GetDatabase(DBNAME); var doc = db.GetDocument<JDocument>(id); return doc; }
private void MainForm_Load(object sender, EventArgs e) { theClient = new CouchClient(Settings.Host, Settings.Port, Settings.Username, Settings.Password); theClient.GetDatabase(Settings.DatabaseName, new Result<CouchDatabase>()).WhenDone( a => BeginInvoke((MethodInvoker) (() => DatabaseLoaded(a))), ErrorManagement.ProcessException ); }
public MainWindow() : base(Gtk.WindowType.Toplevel) { Build (); var couchClient = new DreamSeat.CouchClient("localhost", 5984); couchClient.GetDatabase ("explosions", new Result<CouchDatabase>()).WhenDone((database) => { Console.Out.WriteLine("SUCCESS!"); }, e => { Console.Out.WriteLine ("Failure! :( " + e.Message); }); var editor = new NoteEditor(); this.notebook1.Add(editor); editor.Show(); }
public MainWindow() : base(Gtk.WindowType.Toplevel) { Build(); var couchClient = new DreamSeat.CouchClient("localhost", 5984); couchClient.GetDatabase("explosions", new Result <CouchDatabase>()).WhenDone((database) => { Console.Out.WriteLine("SUCCESS!"); }, e => { Console.Out.WriteLine("Failure! :( " + e.Message); }); var editor = new NoteEditor(); this.notebook1.Add(editor); editor.Show(); }
public static JDocument Store(string id, dynamic obj) { var cli = new CouchClient(); var db = cli.GetDatabase(DBNAME); return db.CreateDocument<JDocument>(obj); }