コード例 #1
0
        /// <summary>
        /// Search for package IDs.
        /// </summary>
        /// <param name="query">
        /// The search query. If <see langword="null"/>, gets default autocomplete results.
        /// </param>
        /// <param name="cancellationToken">A token to cancel the task.</param>
        /// <returns>The package IDs that matched the query.</returns>
        public virtual async Task <IReadOnlyList <string> > AutocompleteAsync(
            string query = null,
            CancellationToken cancellationToken = default)
        {
            var response = await _searchClient.AutocompleteAsync(query, cancellationToken : cancellationToken);

            return(response.Data);
        }