Ejemplo n.º 1
0
        /// <inheritdoc/>
        public virtual async Task <HttpResponseMessage> GetSearchResponseMessageAsync(int count = 0, OutputMode outputMode = OutputMode.Xml)
        {
            var args = new SearchResultArgs {
                Count = count
            };

            return(await this.GetSearchResponseMessageAsync(args, outputMode));
        }
Ejemplo n.º 2
0
        /// <inheritdoc/>
        public virtual async Task <SearchResultStream> GetSearchPreviewAsync(int count = 0)
        {
            var args = new SearchResultArgs {
                Count = count
            };
            var searchResults = await this.GetSearchPreviewAsync(args);

            return(searchResults);
        }
Ejemplo n.º 3
0
        /// <inheritdoc/>
        public virtual async Task<HttpResponseMessage> GetSearchResponseMessageAsync(SearchResultArgs args, OutputMode outputMode = OutputMode.Xml)
        {
            await this.TransitionAsync(DispatchState.Done).ConfigureAwait(false);

            var resourceName = new ResourceName(this.ResourceName, "results");
            var requestArgs = args.AsEnumerable().Concat(new SearchResponseMessageArgs { OutputMode = outputMode });
            var message = await this.Context.GetHttpResponseMessageAsync(this.Namespace, resourceName, requestArgs).ConfigureAwait(false);

            try
            {
                message.EnsureSuccessStatusCode();
            }
            catch
            {
                message.Dispose();
                throw;
            }

            return message;
        }
Ejemplo n.º 4
0
        /// <inheritdoc/>
        public virtual async Task <SearchResultStream> GetSearchPreviewAsync(SearchResultArgs args)
        {
            var searchResults = await this.GetSearchResultsAsync(DispatchState.Running, "results_preview", args).ConfigureAwait(false);

            return(searchResults);
        }
Ejemplo n.º 5
0
 public abstract Task <SearchResultStream> GetSearchResultsAsync(SearchResultArgs args);
Ejemplo n.º 6
0
 public abstract Task <HttpResponseMessage> GetSearchResponseMessageAsync(SearchResultArgs args, OutputMode outputMode = OutputMode.Xml);
Ejemplo n.º 7
0
 /// <inheritdoc/>
 public virtual async Task<SearchResultStream> GetSearchResultsAsync(SearchResultArgs args)
 {
     var searchResults = await this.GetSearchResultsAsync(DispatchState.Done, "results", args).ConfigureAwait(false);
     return searchResults;
 }