コード例 #1
0
		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();
		}
コード例 #2
0
 public static dynamic RetrieveById(string id)
 {
     var cli = new CouchClient();
     var db = cli.GetDatabase(DBNAME);
     var doc = db.GetDocument<JDocument>(id);
     return doc;
 }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: jaimerosales/DreamSeat
        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
                );
        }
コード例 #4
0
ファイル: NoteBrowser.cs プロジェクト: Macadamian/snively
    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();
    }
コード例 #5
0
ファイル: NoteBrowser.cs プロジェクト: orospakr/snively
    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();
    }
コード例 #6
0
 public static JDocument Store(string id, dynamic obj)
 {
     var cli = new CouchClient();
     var db = cli.GetDatabase(DBNAME);
     return db.CreateDocument<JDocument>(obj);
 }