예제 #1
0
파일: Documents.cs 프로젝트: RhysC/mycouch
        public Documents(IConnection connection, DocumentResponseFactory documentReponseFactory, DocumentHeaderResponseFactory documentHeaderResponseFactory, BulkResponseFactory bulkResponseFactory)
        {
            Ensure.That(connection, "connection").IsNotNull();
            Ensure.That(documentReponseFactory, "documentReponseFactory").IsNotNull();
            Ensure.That(documentHeaderResponseFactory, "documentHeaderResponseFactory").IsNotNull();
            Ensure.That(bulkResponseFactory, "bulkResponseFactory").IsNotNull();

            Connection                   = connection;
            DocumentReponseFactory       = documentReponseFactory;
            DocumentHeaderReponseFactory = documentHeaderResponseFactory;
            BulkReponseFactory           = bulkResponseFactory;
        }
예제 #2
0
        public Documents(IConnection connection, IDocumentSerializer serializer)
            : base(connection)
        {
            Ensure.That(serializer, "serializer").IsNotNull();

            Serializer                        = serializer;
            BulkHttpRequestFactory            = new BulkHttpRequestFactory(Connection);
            CopyDocumentHttpRequestFactory    = new CopyDocumentHttpRequestFactory(Connection);
            ReplaceDocumentHttpRequestFactory = new ReplaceDocumentHttpRequestFactory(Connection);
            DocumentExistsHttpRequestFactory  = new DocumentExistsHttpRequestFactory(Connection);
            GetDocumentHttpRequestFactory     = new GetDocumentHttpRequestFactory(Connection);
            PostDocumentHttpRequestFactory    = new PostDocumentHttpRequestFactory(Connection);
            PutDocumentHttpRequestFactory     = new PutDocumentHttpRequestFactory(Connection);
            DeleteDocumentHttpRequestFactory  = new DeleteDocumentHttpRequestFactory(Connection);

            DocumentReponseFactory       = new DocumentResponseFactory(Serializer);
            DocumentHeaderReponseFactory = new DocumentHeaderResponseFactory(Serializer);
            BulkReponseFactory           = new BulkResponseFactory(Serializer);
        }
예제 #3
0
        public Documents(IDbConnection connection, ISerializer serializer)
            : base(connection)
        {
            Ensure.Any.IsNotNull(serializer, nameof(serializer));

            Serializer                        = serializer;
            BulkHttpRequestFactory            = new BulkHttpRequestFactory();
            CopyDocumentHttpRequestFactory    = new CopyDocumentHttpRequestFactory();
            ReplaceDocumentHttpRequestFactory = new ReplaceDocumentHttpRequestFactory();
            HeadDocumentHttpRequestFactory    = new HeadDocumentHttpRequestFactory();
            GetDocumentHttpRequestFactory     = new GetDocumentHttpRequestFactory();
            PostDocumentHttpRequestFactory    = new PostDocumentHttpRequestFactory();
            PutDocumentHttpRequestFactory     = new PutDocumentHttpRequestFactory();
            DeleteDocumentHttpRequestFactory  = new DeleteDocumentHttpRequestFactory();
            QueryShowHttpRequestFactory       = new QueryShowHttpRequestFactory(Serializer);

            DocumentReponseFactory       = new DocumentResponseFactory(Serializer);
            DocumentHeaderReponseFactory = new DocumentHeaderResponseFactory(Serializer);
            BulkReponseFactory           = new BulkResponseFactory(Serializer);
            RawResponseFactory           = new RawResponseFactory(Serializer);
        }