Esempio n. 1
0
        public void DownloadAsync(string text, object userArgs)
        {
            IDSearchBaseSettings <IDSearchResult> settings = null;

            if (this.Settings != null && this.Settings is IQuerySettings)
            {
                settings = (IDSearchBaseSettings <IDSearchResult>) this.Settings.Clone();
            }
            else
            {
                settings = new IDInstantSearchDownloadSettings();
            }
            ((IQuerySettings)settings).Query = text;
            this.DownloadAsync(settings, userArgs);
        }
Esempio n. 2
0
        /// <summary>
        /// Downloads search results for Yahoo IDs by keyword and other options
        /// </summary>
        /// <param name="text">The used search text</param>
        /// <returns></returns>
        /// <remarks></remarks>
        public Base.Response <IDSearchResult> Download(string text)
        {
            if (text.Trim() == string.Empty)
            {
                throw new ArgumentNullException("text", "The text is empty.");
            }
            IDSearchBaseSettings <IDSearchResult> settings = null;

            if (this.Settings != null && this.Settings is IQuerySettings)
            {
                settings = (IDSearchBaseSettings <IDSearchResult>) this.Settings.Clone();
            }
            else
            {
                settings = new IDInstantSearchDownloadSettings();
            }
            ((IQuerySettings)settings).Query = text;
            return(this.Download(settings));
        }