Esempio n. 1
0
        public virtual CouchUri NewUri()
        {
            var uri = configuration.Preauthorize
                          ? CouchUri.Build(
                configuration.User,
                configuration.Password,
                configuration.Protocol,
                configuration.Server,
                configuration.Port)
                          : CouchUri.Build(
                configuration.Protocol,
                configuration.Server,
                configuration.Port);

            return(uri);
        }
Esempio n. 2
0
        public virtual CouchUri NewUri(string database)
        {
            var uri = configuration.Preauthorize
                          ? CouchUri.Build(
                configuration.User,
                configuration.Password,
                configuration.Protocol,
                configuration.Server,
                configuration.Port,
                database)
                          : CouchUri.Build(
                configuration.Protocol,
                configuration.Server,
                configuration.Port,
                database);

            EnsureDatabaseExists(database);
            return(uri);
        }