Beispiel #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));
        }
Beispiel #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);
        }
Beispiel #3
0
 internal override bool EnsureIsValid(DefaultFolderContext context, Folder folder)
 {
     return(base.EnsureIsValid(context, folder) && AllItemsFolderValidation.VerifyAndFixSearchFolder(context, (SearchFolder)folder));
 }