Exemplo n.º 1
0
        public virtual async Task <SearchIndexResponse <TIncludedDoc> > SearchAsync <TIncludedDoc>(SearchIndexRequest request)
        {
            Ensure.Any.IsNotNull(request, nameof(request));

            var httpRequest = SearchIndexHttpRequestFactory.Create(request);

            using (var res = await SendAsync(httpRequest).ForAwait())
            {
                return(await SearchIndexResponseFactory.CreateAsync <TIncludedDoc>(res).ForAwait());
            }
        }
Exemplo n.º 2
0
        public virtual async Task <SearchIndexResponse> SearchAsync(SearchIndexRequest request)
        {
            Ensure.That(request, "request").IsNotNull();

            var httpRequest = SearchIndexHttpRequestFactory.Create(request);

            using (var res = await SendAsync(httpRequest).ForAwait())
            {
                return(await SearchIndexResponseFactory.CreateAsync(res).ForAwait());
            }
        }
Exemplo n.º 3
0
 protected virtual HttpRequest CreateHttpRequest(SearchIndexRequest request)
 {
     return(SearchIndexHttpRequestFactory.Create(request));
 }