Пример #1
0
        /// <summary>
        /// Search books.
        /// </summary>
        /// <param name="keyword">The keyword.</param>
        /// <param name="resultCount">The count of result itmes.</param>
        /// <param name="fullViewOnly">Whether to restrict the search to "full view" books.</param>
        /// <param name="library">The specified user-defined library. If it not null, the search will restrict the search to this library.</param>
        /// <returns>The result items.</returns>
        /// <remarks>Now, the max count of items Google given is <b>64</b>.</remarks>
        public IList <IBookResult> Search(string keyword, int resultCount, bool fullViewOnly, string library)
        {
            if (keyword == null)
            {
                throw new ArgumentNullException("keyword");
            }

            var request = new GbookSearchRequest {
                Query = keyword, FullViewOnly = fullViewOnly, Library = library
            };

            return(this.Search <GbookResult, IBookResult>(request, resultCount));
        }
Пример #2
0
        /// <summary>
        /// Search books.
        /// </summary>
        /// <param name="keyword">The keyword.</param>
        /// <param name="resultCount">The count of result itmes.</param>
        /// <param name="fullViewOnly">Whether to restrict the search to "full view" books.</param>
        /// <param name="library">The specified user-defined library. If it not null, the search will restrict the search to this library.</param>
        /// <param name="callback">The <see cref="AsyncCallback"/> delegate.</param>
        /// <param name="state">An object containing state information for this asynchronous request.</param>
        /// <returns>An <see cref="IAsyncResult"/> that references the asynchronous request.</returns>
        public IAsyncResult BeginSearch(string keyword, int resultCount, bool fullViewOnly, string library, AsyncCallback callback, object state)
        {
            if (keyword == null)
            {
                throw new ArgumentNullException("keyword");
            }

            var request = new GbookSearchRequest {
                Query = keyword, FullViewOnly = fullViewOnly, Library = library
            };

            return(this.BeginSearch <GbookResult>(request, resultCount, callback, state));
        }
        /// <summary>
        /// Search books.
        /// </summary>
        /// <param name="keyword">The keyword.</param>
        /// <param name="resultCount">The count of result itmes.</param>
        /// <param name="fullViewOnly">Whether to restrict the search to "full view" books.</param>
        /// <param name="library">The specified user-defined library. If it not null, the search will restrict the search to this library.</param>
        /// <returns>The result items.</returns>
        /// <remarks>Now, the max count of items Google given is <b>64</b>.</remarks>
        public IList<IBookResult> Search(string keyword, int resultCount, bool fullViewOnly, string library)
        {
            if (keyword == null)
            {
                throw new ArgumentNullException("keyword");
            }

            var request = new GbookSearchRequest { Query = keyword, FullViewOnly = fullViewOnly, Library = library };
            return this.Search<GbookResult, IBookResult>(request, resultCount);
        }
        /// <summary>
        /// Search books.
        /// </summary>
        /// <param name="keyword">The keyword.</param>
        /// <param name="resultCount">The count of result itmes.</param>
        /// <param name="fullViewOnly">Whether to restrict the search to "full view" books.</param>
        /// <param name="library">The specified user-defined library. If it not null, the search will restrict the search to this library.</param>
        /// <param name="callback">The <see cref="AsyncCallback"/> delegate.</param>
        /// <param name="state">An object containing state information for this asynchronous request.</param>
        /// <returns>An <see cref="IAsyncResult"/> that references the asynchronous request.</returns>
        public IAsyncResult BeginSearch(string keyword, int resultCount, bool fullViewOnly, string library, AsyncCallback callback, object state)
        {
            if (keyword == null)
            {
                throw new ArgumentNullException("keyword");
            }

            var request = new GbookSearchRequest { Query = keyword, FullViewOnly = fullViewOnly, Library = library };
            return this.BeginSearch<GbookResult>(request, resultCount, callback, state);
        }