Esempio n. 1
0
        // Token: 0x06000D0C RID: 3340 RVA: 0x00058690 File Offset: 0x00056890
        internal static bool RemoveOtherMailbox(UserContext userContext, string legacyDN)
        {
            SimpleConfiguration <OtherMailboxConfigEntry> otherMailboxConfig = OtherMailboxConfiguration.GetOtherMailboxConfig(userContext);
            OtherMailboxConfigEntry otherMailboxConfigEntry = OtherMailboxConfiguration.FindOtherMailboxConfigEntry(otherMailboxConfig, legacyDN);

            if (otherMailboxConfigEntry != null)
            {
                otherMailboxConfig.Entries.Remove(otherMailboxConfigEntry);
                otherMailboxConfig.Save();
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
        // Token: 0x06000D0B RID: 3339 RVA: 0x00058630 File Offset: 0x00056830
        internal static OtherMailboxConfigEntry AddOtherMailboxSession(UserContext userContext, MailboxSession mailboxSession)
        {
            SimpleConfiguration <OtherMailboxConfigEntry> otherMailboxConfig = OtherMailboxConfiguration.GetOtherMailboxConfig(userContext);

            if (OtherMailboxConfiguration.FindOtherMailboxConfigEntry(otherMailboxConfig, mailboxSession.MailboxOwnerLegacyDN) != null)
            {
                return(null);
            }
            StoreObjectId           defaultFolderId         = Utilities.GetDefaultFolderId(mailboxSession, DefaultFolderType.Root);
            OtherMailboxConfigEntry otherMailboxConfigEntry = new OtherMailboxConfigEntry(Utilities.GetMailboxOwnerDisplayName(mailboxSession), OwaStoreObjectId.CreateFromOtherUserMailboxFolderId(defaultFolderId, mailboxSession.MailboxOwner.LegacyDn));

            otherMailboxConfig.Entries.Add(otherMailboxConfigEntry);
            otherMailboxConfig.Save();
            return(otherMailboxConfigEntry);
        }