コード例 #1
0
        public virtual async Task <PurgeResponse> PurgeAsync(PurgeRequest request, CancellationToken cancellationToken = default)
        {
            var httpRequest = PurgeHttpRequestFactory.Create(request);

            using (var res = await SendAsync(httpRequest, cancellationToken).ForAwait())
            {
                return(await PurgeResponseFactory.CreateAsync(res).ForAwait());
            }
        }
コード例 #2
0
        public Documents(IDbConnection connection, ISerializer serializer)
            : base(connection)
        {
            Ensure.Any.IsNotNull(serializer, nameof(serializer));

            Serializer                        = serializer;
            BulkHttpRequestFactory            = new BulkHttpRequestFactory();
            PurgeHttpRequestFactory           = new PurgeHttpRequestFactory(Serializer);
            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);
            PurgeResponseFactory         = new PurgeResponseFactory(Serializer);
        }