private void AttemptToRestoreLastEventAdvisor(UserContext userContext) { LastEventAdvisor lastEventAdvisor = LastEventAdvisor.Create(userContext.MailboxSession, this.eventCondition); this.lastEventAdvisor.Dispose(); this.lastEventAdvisor = lastEventAdvisor; }
internal OwaLastEventAdvisor(UserContext userContext, StoreObjectId folderId, EventObjectType objectType, EventType eventType) { this.eventCondition = new EventCondition(); this.folderId = folderId; this.eventCondition.EventType = eventType; this.eventCondition.ObjectType = objectType; this.eventCondition.ContainerFolderIds.Add(folderId); this.lastEventAdvisor = LastEventAdvisor.Create(userContext.MailboxSession, this.eventCondition); }