コード例 #1
0
 /// <summary>
 /// Gets the search results.
 /// </summary>
 /// <param name="session">The session the method works on</param>
 /// <param name="cache">The cache to store the results in</param>
 /// <returns>A list of search result rows if present, or null if no such value is present in the session</returns>
 public static List <SearchResultRow> GetSearchResults(this ISession session, IMemoryCache cache)
 {
     return(SessionAdapter.GetSearchResultsFromCache(session, cache)?.SearchResults);
 }
コード例 #2
0
 /// <summary>
 /// Gets the search terms.
 /// </summary>
 /// <param name="session">The session the method works on</param>
 /// <param name="cache">The cache to store the results in</param>
 /// <returns>string of search terms, and an empty string if no such value is present in the session</returns>
 public static string GetSearchTerms(this ISession session, IMemoryCache cache)
 {
     return(SessionAdapter.GetSearchResultsFromCache(session, cache)?.SearchTerms ?? string.Empty);
 }