예제 #1
0
        protected override void SetPropertiesInternal(DefaultFolderContext context, Folder folder)
        {
            base.SetPropertiesInternal(context, folder);
            SearchFolder searchFolder = (SearchFolder)folder;

            searchFolder.Save();
            searchFolder.Load(null);
            AllItemsFolderHelper.InitializeTransportIndexes(folder);
            AllItemsFolderValidation.TryApplyContinuousSearch(searchFolder, AllItemsFolderValidation.CreateSearchCriteria(context));
        }
예제 #2
0
        private static bool VerifyAndFixSearchFolder(DefaultFolderContext context, SearchFolder folder)
        {
            SearchFolderCriteria searchFolderCriteria  = SearchFolderValidation.TryGetSearchCriteria(folder);
            SearchFolderCriteria searchFolderCriteria2 = AllItemsFolderValidation.CreateSearchCriteria(context);

            if (searchFolderCriteria == null || !SearchFolderValidation.MatchSearchFolderCriteria(searchFolderCriteria, searchFolderCriteria2))
            {
                AllItemsFolderValidation.TryApplyContinuousSearch(folder, searchFolderCriteria2);
            }
            return(true);
        }