コード例 #1
0
        public virtual async Task <IndexResponse> DeleteAsync(DeleteIndexRequest request, CancellationToken cancellationToken = default)
        {
            Ensure.Any.IsNotNull(request, nameof(request));

            var httpRequest = DeleteIndexHttpRequestFactory.Create(request);

            using (var res = await SendAsync(httpRequest, cancellationToken).ForAwait())
            {
                return(await IndexResponseFactory.CreateAsync(res).ForAwait());
            }
        }
コード例 #2
0
        public virtual async Task <IndexResponse> DeleteAsync(DeleteIndexRequest request)
        {
            Ensure.That(request, "request").IsNotNull();

            var httpRequest = DeleteIndexHttpRequestFactory.Create(request);

            using (var res = await SendAsync(httpRequest).ForAwait())
            {
                return(await IndexResponseFactory.CreateAsync(res).ForAwait());
            }
        }
コード例 #3
0
        public virtual async Task <IndexResponse> PostAsync(PostIndexRequest request)
        {
            Ensure.Any.IsNotNull(request, nameof(request));

            var httpRequest = PostIndexHttpRequestFactory.Create(request);

            using (var res = await SendAsync(httpRequest).ForAwait())
            {
                return(await IndexResponseFactory.CreateAsync(res).ForAwait());
            }
        }