private void LoadSearchProviderFromConfig() { string searchProvider = SiteSettings.Instance.SearchProvider; if (string.IsNullOrEmpty(searchProvider)) { Instance = new NullSearchProvider(); return; } Type searchProviderType = Type.GetType(searchProvider); if (searchProviderType == null) { Utils.Throw<NullReferenceException>("Type.GetType(" + searchProvider + ") returned null."); } Instance = (SearchProviderBase)Activator.CreateInstance(searchProviderType); Instance.Init(); Dashboard.RegisterArea(new SearchDashboardArea()); }
private void LoadSearchProviderFromConfig() { string searchProvider = SiteSettings.Instance.SearchProvider; if (string.IsNullOrEmpty(searchProvider)) { Instance = new NullSearchProvider(); return; } Type searchProviderType = Type.GetType(searchProvider); if (searchProviderType == null) { Utils.Throw <NullReferenceException>("Type.GetType(" + searchProvider + ") returned null."); } Instance = (SearchProviderBase)Activator.CreateInstance(searchProviderType); Instance.Init(); Dashboard.RegisterArea(new SearchDashboardArea()); }