public SearchSessionOptionsApplicator(ISearchApi api, SearchSessionOptions options) { m_Api = api; m_Options = options; m_Disposed = false; m_CurrentActiveEngine = m_Api?.activeSearchEngineName; if (m_Options.legacyOnly) { m_Api?.SetActiveSearchEngine(LegacySearchEngineBase.k_Name, false); } }
public void EndSession() { if (!m_WasSearching) { return; } m_WasSearching = false; using (new SearchSessionOptionsApplicator(m_Api, m_Options)) m_Api?.EndSession(context); context = null; m_Options = SearchSessionOptions.Default; }
public void BeginSession(Func <ISearchContext> searchContextCreator, SearchSessionOptions options) { if (m_WasSearching) { return; } // Do a lazy initialize if the apis were not available during creation if (m_Api == null) { Init(); if (m_Api == null) { throw new NullReferenceException("SearchService Apis were not initialized properly."); } } m_Options = options; context = searchContextCreator(); m_WasSearching = true; using (new SearchSessionOptionsApplicator(m_Api, options)) m_Api?.BeginSession(context); }
public FilteredHierarchy(HierarchyType type, SearchService.SearchSessionOptions searchSessionOptions) { m_HierarchyType = type; m_SearchSessionOptions = searchSessionOptions; }
public FilteredHierarchy(HierarchyType type) { m_HierarchyType = type; m_SearchSessionOptions = SearchService.SearchSessionOptions.Default; }
// Called when the filter has changed abstract public void UpdateFilter(HierarchyType hierarchyType, SearchFilter searchFilter, bool showFoldersFirst, SearchService.SearchSessionOptions searchSessionOptions);