Пример #1
0
        public MyCouchClient(DbConnectionInfo connectionInfo, MyCouchClientBootstrapper bootstrapper = null)
        {
            Ensure.That(connectionInfo, "connectionInfo").IsNotNull();

            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);
            Views = bootstrapper.ViewsFn(Connection);
        }
Пример #2
0
        public MyCouchClient(DbConnectionInfo connectionInfo, MyCouchClientBootstrapper bootstrapper = null)
        {
            Ensure.That(connectionInfo, "connectionInfo").IsNotNull();

            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);
            Views = bootstrapper.ViewsFn(Connection);
        }
Пример #3
0
        public MyCouchClient(IDbClientConnection connection, MyCouchClientBootstrapper bootstrapper = null)
        {
            Ensure.That(connection, "connection").IsNotNull();

            Connection = connection;

            bootstrapper = bootstrapper ?? new MyCouchClientBootstrapper();

            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);
            IsDisposed = false;
        }
Пример #4
0
        public MyCouchClient(IDbClientConnection connection, MyCouchClientBootstrapper bootstrapper = null)
        {
            Ensure.That(connection, "connection").IsNotNull();

            Connection = connection;

            bootstrapper = bootstrapper ?? new MyCouchClientBootstrapper();

            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);
            IsDisposed = false;
        }