示例#1
0
        protected CouchBase(ICouchConnection couchConnection)
        {
            this.couchConnection = couchConnection;

            if (couchConnection.AuthenticationType == AuthenticationType.Cookie)
                couchConnection.SessionCookie = GetSession();
        }
示例#2
0
        public CouchService(ICouchConnection connection)
        {
            if (connection == null)
            {
                throw new ArgumentNullException();
            }

            Connection = connection;
        }
示例#3
0
 // Authentication type used in request to CouchDB
 //protected readonly AuthenticationType authType;
 /// <summary>
 /// This is only intended for use if your CouchDb is in Admin Party
 /// </summary>
 //public CouchClient()
 //    : this("localhost", 5984, null, null, false, AuthenticationType.Basic, DbType.CouchDb)
 //{
 //}
 ///// <summary>
 ///// CouchClient constructor
 ///// </summary>
 ///// <param name="username"></param>
 ///// <param name="password"></param>
 //public CouchClient(string username, string password)
 //    : this("localhost", 5984, username, password, false, AuthenticationType.Basic, DbType.CouchDb)
 //{
 //}
 ///// <summary>
 ///// Constructs the CouchClient and gets an authentication cookie (10 min)
 ///// </summary>
 ///// <param name="host">The hostname of the CouchDB instance</param>
 ///// <param name="port">The port of the CouchDB instance</param>
 ///// <param name="username">The username of the CouchDB instance</param>Cou
 ///// <param name="password">The password of the CouchDB instance</param>
 //public CouchClient(string host, int port, string username, string password, bool isHttps, AuthenticationType aT, DbType dbType)
 //    : base(username, password, aT, dbType, GetBaseUri(host, port, isHttps))
 //{
 //    //if (isHttps == false)
 //    //{
 //    //    baseUri = "http://" + host + ":" + port + "/";
 //    //}
 //    //else
 //    //{
 //    //    baseUri = "https://" + host + ":" + port + "/";
 //    //}
 //    //authType = aT;
 //}
 public CouchClient(ICouchConnection connection)
     : base(connection)
 {
 }