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 Dispose() { if (m_Disposed) { return; } if (m_Options.legacyOnly) { m_Api?.SetActiveSearchEngine(m_CurrentActiveEngine, false); } m_Disposed = true; }