Beispiel #1
0
 public void SubscribeForSearchPageNotify(StoreObjectId searchFolderId, SearchFolder searchFolder, SearchFolderCriteria searchCriteria, string searchString)
 {
     if (!this.userContext.LockedByCurrentThread())
     {
         throw new InvalidOperationException("UserContext lock should be acquired before calling this method");
     }
     lock (this)
     {
         this.ResetSearchFolderReferences(true);
         this.InitSubscriptions(ClientSubscriptionFlags.StaticSearch);
         this.hasCurrentSearchCompleted             = false;
         this.wasFailNonContentIndexedSearchFlagSet = searchCriteria.FailNonContentIndexedSearch;
         this.searchFolderIdCurrent = OwaStoreObjectId.CreateFromSessionFolderId(this.userContext, this.mailboxSession, searchFolderId);
         this.searchSub             = Subscription.Create(this.mailboxSession, new NotificationHandler(this.HandleFullSearchComplete), NotificationType.SearchComplete, searchFolderId);
         searchFolder.ApplyOneTimeSearch(searchCriteria);
         this.searchPerformanceData = new SearchPerformanceData();
         this.searchPerformanceData.StartSearch(searchString);
     }
 }