private static SearchProvider InitializeConfiguredProvider() { SearchProviderElement searchProviders = SearchConfiguration.Instance.SearchProviders; SearchProvider searchProvider = (SearchProvider)ProvidersHelper.InstantiateProvider(searchProviders.Providers[searchProviders.DefaultProvider], typeof(SearchProvider)); if (searchProvider != null) { return(searchProvider); } throw new ProviderException("Unable to load default SearchProvider"); }
private static SearchProvider InitializeConfiguredProvider() { SearchProviderElement searchProviders = SearchConfiguration.Instance.SearchProviders; if (searchProviders.Providers == null) { throw new ProviderException("Failed to initialize search provider section"); } SearchProvider expr_43 = (SearchProvider)ProvidersHelper.InstantiateProvider(searchProviders.Providers[searchProviders.DefaultProvider], typeof(SearchProvider)); if (expr_43 == null) { throw new ProviderException("Unable to load default SearchProvider"); } return(expr_43); }