public void BeginSession(Func <ISearchContext> searchContextCreator) { if (m_WasSearching) { return; } context = searchContextCreator(); m_WasSearching = true; m_Api?.BeginSession(context); }
public void BeginSession(Func <ISearchContext> searchContextCreator) { 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."); } } context = searchContextCreator(); m_WasSearching = true; m_Api?.BeginSession(context); }