public virtual async Task <IndexListResponse> GetAllAsync() { var httpRequest = GetAllIndexesHttpRequestFactory.Create(); using (var res = await SendAsync(httpRequest).ForAwait()) { return(await IndexListResponseFactory.CreateAsync(res).ForAwait()); } }
public virtual async Task <IndexListResponse> GetAllAsync(CancellationToken cancellationToken = default) { var httpRequest = GetAllIndexesHttpRequestFactory.Create(); using (var res = await SendAsync(httpRequest, cancellationToken).ForAwait()) { return(await IndexListResponseFactory.CreateAsync(res).ForAwait()); } }
public Queries(IDbConnection connection, ISerializer documentSerializer, ISerializer serializer) : base(connection) { Ensure.That(documentSerializer, "documentSerializer").IsNotNull(); Ensure.That(serializer, "serializer").IsNotNull(); PostIndexHttpRequestFactory = new PostIndexHttpRequestFactory(serializer); GetAllIndexesHttpRequestFactory = new GetAllIndexesHttpRequestFactory(); DeleteIndexHttpRequestFactory = new DeleteIndexHttpRequestFactory(); FindHttpRequestFactory = new FindHttpRequestFactory(serializer); IndexResponseFactory = new IndexResponseFactory(serializer); IndexListResponseFactory = new IndexListResponseFactory(serializer); FindResponseFactory = new FindResponseFactory(documentSerializer); }