Exemplo n.º 1
0
        public override IConfigurable Read(MailboxStoreTypeProvider session, ObjectId identity)
        {
            base.Principal = ExchangePrincipal.FromADUser(session.ADUser, null);
            IConfigurable result;

            using (UserConfigurationDictionaryAdapter <MailboxSpellingConfiguration> userConfigurationDictionaryAdapter = new UserConfigurationDictionaryAdapter <MailboxSpellingConfiguration>(session.MailboxSession, "OWA.UserOptions", new GetUserConfigurationDelegate(UserConfigurationHelper.GetMailboxConfiguration), MailboxSpellingConfiguration.mailboxProperties))
            {
                result = userConfigurationDictionaryAdapter.Read(base.Principal);
            }
            return(result);
        }
Exemplo n.º 2
0
        public static T Read <T>(MailboxStoreTypeProvider session, Guid requestGuid) where T : MRSRequest, new()
        {
            ExchangePrincipal principal = ExchangePrincipal.FromADUser(session.ADUser, null);
            T result;

            using (UserConfigurationDictionaryAdapter <T> userConfigurationDictionaryAdapter = new UserConfigurationDictionaryAdapter <T>(session.MailboxSession, MRSRequest.GetName(requestGuid), new GetUserConfigurationDelegate(UserConfigurationHelper.GetMailboxConfiguration), MRSRequestSchema.PersistedProperties))
            {
                try
                {
                    T t = userConfigurationDictionaryAdapter.Read(principal);
                    if (t.RequestGuid != requestGuid)
                    {
                        throw new CannotFindRequestIndexEntryException(requestGuid);
                    }
                    result = t;
                }
                catch (FormatException innerException)
                {
                    throw new CannotFindRequestIndexEntryException(requestGuid, innerException);
                }
            }
            return(result);
        }