Esempio n. 1
0
        /// <summary>
        /// Gets an approximate count of the results that a search using the specified criteria would return.
        /// </summary>
        public bool EstimateSearchResultsCount(WorklistItemSearchArgs args, out int count)
        {
            var wisc = new SearchContext(this, args, null);
            IWorklistItemSearchExecutionStrategy strategy = new OptimizedWorklistItemSearchExecutionStrategy();

            return(strategy.EstimateSearchResultsCount(wisc, out count));
        }
Esempio n. 2
0
        /// <summary>
        /// Performs a search using the specified criteria.
        /// </summary>
        public IList <TItem> GetSearchResults <TItem>(WorklistItemSearchArgs args)
            where TItem : WorklistItem
        {
            var wisc = new SearchContext(this, args, typeof(TItem));
            IWorklistItemSearchExecutionStrategy strategy = new OptimizedWorklistItemSearchExecutionStrategy();
            var results = strategy.GetSearchResults(wisc);

            return(CollectionUtils.Map(results, (WorklistItem r) => (TItem)r));
        }