コード例 #1
0
        private bool ValidateUMFaxFilter(DefaultFolderContext context, OutlookSearchFolder folder)
        {
            SearchFolderCriteria searchFolderCriteria = SearchFolderValidation.TryGetSearchCriteria(folder);

            if (searchFolderCriteria == null || !UMFaxValidation.GetUMFaxQueryFilter(context).Equals(searchFolderCriteria.SearchQuery))
            {
                folder.ApplyContinuousSearch(UMFaxValidation.CreateUMFaxSearchCriteria(context));
            }
            return(true);
        }
コード例 #2
0
 internal static SearchFolderCriteria CreateUMFaxSearchCriteria(DefaultFolderContext context)
 {
     return(new SearchFolderCriteria(UMFaxValidation.GetUMFaxQueryFilter(context), new StoreId[]
     {
         context[DefaultFolderType.Inbox]
     })
     {
         DeepTraversal = true
     });
 }
コード例 #3
0
        protected override void SetPropertiesInternal(DefaultFolderContext context, Folder folder)
        {
            base.SetPropertiesInternal(context, folder);
            folder[InternalSchema.OutlookSearchFolderClsId] = UMFaxValidation.UmFaxClsId;
            folder.ClassName = "IPF.Note.Microsoft.Fax";
            OutlookSearchFolder outlookSearchFolder = (OutlookSearchFolder)folder;

            outlookSearchFolder.Save();
            outlookSearchFolder.ApplyContinuousSearch(UMFaxValidation.CreateUMFaxSearchCriteria(context));
            outlookSearchFolder.Load(null);
            outlookSearchFolder.MakeVisibleToOutlook(true);
        }