/// <summary> /// Search for packages. Includes prerelease packages. /// </summary> /// <param name="query">The search query.</param> /// <param name="cancellationToken">A token to cancel the task.</param> /// <returns>The search results, including prerelease packages.</returns> public async Task <SearchResponse> SearchAsync(string query, CancellationToken cancellationToken = default) { var request = new SearchRequest { Query = query, Skip = 0, Take = 20, IncludePrerelease = true, IncludeSemVer2 = true, }; var client = await _clientFactory.CreateSearchClientAsync(cancellationToken); return(await client.SearchAsync(request, cancellationToken)); }
/// <summary> /// Search for packages. Includes prerelease packages. /// </summary> /// <param name="query">The search query.</param> /// <param name="cancellationToken">A token to cancel the task.</param> /// <returns>The search results, including prerelease packages.</returns> public async Task <SearchResponse> SearchAsync(string query, CancellationToken cancellationToken = default) { var client = await _clientFactory.CreateSearchClientAsync(cancellationToken); return(await client.SearchAsync(query, cancellationToken : cancellationToken)); }