Beispiel #1
0
        private void PreprocessSearch(SearchFolderCriteria searchFolderCriteria, SearchFolder.SearchType searchType, out SetSearchCriteriaFlags searchCriteriaFlags)
        {
            if (searchFolderCriteria == null)
            {
                throw new ArgumentNullException("searchFolderCriteria");
            }
            if (this.IsDirty)
            {
                throw new InvalidOperationException(ServerStrings.ExMustSaveFolderToApplySearch);
            }
            this.DisposeCurrentSearch();
            SetSearchCriteriaFlags setSearchCriteriaFlags = SetSearchCriteriaFlags.None;

            if (searchFolderCriteria.StatisticsOnly)
            {
                setSearchCriteriaFlags |= SetSearchCriteriaFlags.StatisticsOnly;
            }
            if (searchFolderCriteria.EstimateCountOnly)
            {
                setSearchCriteriaFlags |= SetSearchCriteriaFlags.EstimateCountOnly;
            }
            searchCriteriaFlags = SearchFolder.CalculateSearchCriteriaFlags(searchFolderCriteria.DeepTraversal, searchFolderCriteria.UseCiForComplexQueries, setSearchCriteriaFlags, searchFolderCriteria.FailNonContentIndexedSearch, searchType);
        }