public MyCouchClient(DbConnectionInfo connectionInfo, MyCouchClientBootstrapper bootstrapper = null)
        {
            EnsureArg.IsNotNull(connectionInfo, nameof(connectionInfo));

            IsDisposed   = false;
            bootstrapper = bootstrapper ?? MyCouchClientBootstrappers.Default;

            Connection = bootstrapper.DbConnectionFn(connectionInfo);
            Serializer = bootstrapper.SerializerFn();
            // DocumentSerializer = bootstrapper.DocumentSerializerFn();
            Changes = bootstrapper.ChangesFn(Connection);
            //Attachments = bootstrapper.AttachmentsFn(Connection);
            //Database = bootstrapper.DatabaseFn(Connection);
            //Documents = bootstrapper.DocumentsFn(Connection);
            //Entities = bootstrapper.EntitiesFn(Connection);
            //Queries = bootstrapper.QueriesFn(Connection);
            ////Searches = bootstrapper.SearchesFn(Connection);
            //Views = bootstrapper.ViewsFn(Connection);
        }
Exemplo n.º 2
0
 static MyCouchClientBootstrappers()
 {
     Default = new MyCouchClientBootstrapper();
 }
 public MyCouchClient(Uri serverAddress, string dbName, MyCouchClientBootstrapper bootstrapper = null)
     : this(new DbConnectionInfo(serverAddress, dbName), bootstrapper)
 {
 }
 public MyCouchClient(string serverAddress, string dbName, MyCouchClientBootstrapper bootstrapper = null)
     : this(new Uri(serverAddress), dbName, bootstrapper)
 {
 }