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; }
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); }
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); }