コード例 #1
0
        //private static void GetProviders(List<Filter> filters)
        //{
        //    Task<DocumentSearchResult<AzureSearchProviderRequestedFields>> task = Providers.GetProviders(0, 25, null, filters, false, false);
        //    task.Wait();
        //}
        private static void GetSuggestions(string searchTerm)
        {
            List <Task <List <SuggestionResponse> > > tasks = new List <Task <List <SuggestionResponse> > >(4);

            tasks.Add(Conditions.GetSuggestions(searchTerm));   //13K condition entries. (1.6MB)  Kick it off first.
            tasks.Add(Names.GetSuggestions(searchTerm));        //4K name entries. (0.6MB)
            tasks.Add(Specialties.GetSuggestions(searchTerm));  //2K specialty entries. (0.4MB)
            tasks.Add(Insurances.GetSuggestions(searchTerm));   //0.1K insurance entries. (0.1MB)

            Task.WaitAll(tasks.ToArray());
        }