Esempio n. 1
0
        internal PropertyBag GetMailboxPropertyBag()
        {
            MemoryPropertyBag memoryPropertyBag = this.mailboxPropertyBag;

            if (memoryPropertyBag == null)
            {
                memoryPropertyBag = DefaultFolderContext.SaveLocationContainer(this.Session.Mailbox, DefaultFolderInfo.MailboxProperties);
                if (this.isSessionOpenStage)
                {
                    this.mailboxPropertyBag = memoryPropertyBag;
                }
            }
            return(memoryPropertyBag);
        }
Esempio n. 2
0
        internal PropertyBag GetInboxOrConfigurationFolderPropertyBag()
        {
            MemoryPropertyBag memoryPropertyBag = this.inboxConfigurationPropertyBag;

            if (memoryPropertyBag == null)
            {
                using (Folder folder = this.OpenInboxOrConfigurationFolder())
                {
                    memoryPropertyBag = DefaultFolderContext.SaveLocationContainer(folder, DefaultFolderInfo.InboxOrConfigurationFolderProperties);
                }
                if (this.isSessionOpenStage)
                {
                    this.inboxConfigurationPropertyBag = memoryPropertyBag;
                }
            }
            return(memoryPropertyBag);
        }