public void DisposeOwaConditionAdvisorTable() { if (this.conditionAdvisorTable != null) { IDictionaryEnumerator dictionaryEnumerator = this.conditionAdvisorTable.GetEnumerator(); while (dictionaryEnumerator.MoveNext()) { OwaConditionAdvisor owaConditionAdvisor = (OwaConditionAdvisor)dictionaryEnumerator.Value; owaConditionAdvisor.Dispose(); } this.conditionAdvisorTable.Clear(); this.conditionAdvisorTable = null; } }
public void CreateOwaConditionAdvisor(UserContext userContext, MailboxSession mailboxSession, OwaStoreObjectId folderId, EventObjectType objectType, EventType eventType) { if (userContext == null) { throw new ArgumentNullException("userContext"); } if (folderId == null) { throw new ArgumentNullException("folderId"); } if (!userContext.IsWebPartRequest) { OwaConditionAdvisor value = new OwaConditionAdvisor(mailboxSession, folderId, objectType, eventType); if (this.conditionAdvisorTable == null) { this.conditionAdvisorTable = new Dictionary <OwaStoreObjectId, OwaConditionAdvisor>(); } this.conditionAdvisorTable.Add(folderId, value); } }