public MyCouchCloudantServerClient(ServerConnectionInfo connectionInfo, MyCouchCloudantClientBootstrapper bootstrapper = null) { Ensure.That(connectionInfo, "connectionInfo").IsNotNull(); IsDisposed = false; bootstrapper = bootstrapper ?? MyCouchCloudantClientBootstrappers.Default; Connection = bootstrapper.ServerConnectionFn(connectionInfo); Serializer = bootstrapper.SerializerFn(); Databases = bootstrapper.DatabasesFn(Connection); Replicator = bootstrapper.ReplicatorFn(Connection); Security = bootstrapper.SecurityFn(Connection); }
public MyCouchCloudantServerClient(IServerClientConnection connection, MyCouchCloudantClientBootstrapper bootstrapper = null) { Ensure.That(connection, "connection").IsNotNull(); Connection = connection; bootstrapper = bootstrapper ?? new MyCouchCloudantClientBootstrapper(); Serializer = bootstrapper.SerializerFn(); Security = bootstrapper.SecurityFn(Connection); Databases = bootstrapper.DatabasesFn(Connection); Replicator = bootstrapper.ReplicatorFn(Connection); IsDisposed = false; }
public MyCouchCloudantClient(DbConnectionInfo connectionInfo, MyCouchCloudantClientBootstrapper bootstrapper = null) { Ensure.That(connectionInfo, "connectionInfo").IsNotNull(); IsDisposed = false; bootstrapper = bootstrapper ?? MyCouchCloudantClientBootstrappers.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); Views = bootstrapper.ViewsFn(Connection); Searches = bootstrapper.SearchesFn(Connection); Queries = bootstrapper.QueriesFn(Connection); }