Ejemplo n.º 1
0
 public override void Save(MailboxStoreTypeProvider session)
 {
     using (UserConfigurationDictionaryAdapter <MRSRequest> userConfigurationDictionaryAdapter = new UserConfigurationDictionaryAdapter <MRSRequest>(session.MailboxSession, MRSRequest.GetName(this.RequestGuid), SaveMode.NoConflictResolutionForceSave, new GetUserConfigurationDelegate(UserConfigurationHelper.GetMailboxConfiguration), MRSRequestSchema.PersistedProperties))
     {
         userConfigurationDictionaryAdapter.Save(this);
     }
     base.ResetChangeTracking();
 }
Ejemplo n.º 2
0
 public override void Save(MailboxStoreTypeProvider session)
 {
     using (UserConfigurationDictionaryAdapter <MailboxSpellingConfiguration> userConfigurationDictionaryAdapter = new UserConfigurationDictionaryAdapter <MailboxSpellingConfiguration>(session.MailboxSession, "OWA.UserOptions", new GetUserConfigurationDelegate(UserConfigurationHelper.GetMailboxConfiguration), MailboxSpellingConfiguration.mailboxProperties))
     {
         userConfigurationDictionaryAdapter.Save(this);
     }
     base.ResetChangeTracking();
 }
Ejemplo n.º 3
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);
        }
 public override void Save(MailboxStoreTypeProvider session)
 {
     using (UserConfigurationDictionaryAdapter <MailboxRegionalConfiguration> userConfigurationDictionaryAdapter = new UserConfigurationDictionaryAdapter <MailboxRegionalConfiguration>(session.MailboxSession, "OWA.UserOptions", new GetUserConfigurationDelegate(UserConfigurationHelper.GetMailboxConfiguration), MailboxRegionalConfiguration.mailboxProperties))
     {
         userConfigurationDictionaryAdapter.Save(this);
     }
     if (base.IsModified(MailboxRegionalConfigurationSchema.Language) && this.Language != null)
     {
         this.SaveCultures(session.MailboxSession.GetADRecipientSession(false, ConsistencyMode.FullyConsistent));
     }
     base.ResetChangeTracking();
 }
 public override IConfigurable Read(MailboxStoreTypeProvider session, ObjectId identity)
 {
     base.Principal = ExchangePrincipal.FromADUser(session.ADUser, null);
     using (UserConfigurationDictionaryAdapter <MailboxRegionalConfiguration> userConfigurationDictionaryAdapter = new UserConfigurationDictionaryAdapter <MailboxRegionalConfiguration>(session.MailboxSession, "OWA.UserOptions", new GetUserConfigurationDelegate(UserConfigurationHelper.GetMailboxConfiguration), MailboxRegionalConfiguration.mailboxProperties))
     {
         userConfigurationDictionaryAdapter.Fill(this);
     }
     if (base.Principal.PreferredCultures.Any <CultureInfo>())
     {
         this.Language = base.Principal.PreferredCultures.First <CultureInfo>();
     }
     return(this);
 }
Ejemplo n.º 6
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);
        }
 public override void Save(MailboxStoreTypeProvider session)
 {
     using (UserConfigurationDictionaryAdapter <AggregatedAccountConfiguration> userConfigurationDictionaryAdapter = new UserConfigurationDictionaryAdapter <AggregatedAccountConfiguration>(session.MailboxSession, "AggregatedAccount", SaveMode.NoConflictResolutionForceSave, new GetUserConfigurationDelegate(UserConfigurationHelper.GetMailboxConfiguration), AggregatedAccountConfiguration.aggregatedAccountProperties))
     {
         userConfigurationDictionaryAdapter.Save(this);
     }
     base.ResetChangeTracking();
 }
Ejemplo n.º 8
0
 public override void Save(MailboxStoreTypeProvider session)
 {
     using (WorkingHoursAdapter <MailboxCalendarConfiguration> workingHoursAdapter = new WorkingHoursAdapter <MailboxCalendarConfiguration>(session.MailboxSession))
     {
         using (UserConfigurationDictionaryAdapter <MailboxCalendarConfiguration> userConfigurationDictionaryAdapter = new UserConfigurationDictionaryAdapter <MailboxCalendarConfiguration>(session.MailboxSession, "OWA.UserOptions", new GetUserConfigurationDelegate(UserConfigurationHelper.GetMailboxConfiguration), MailboxCalendarConfiguration.mailboxProperties))
         {
             using (UserConfigurationDictionaryAdapter <MailboxCalendarConfiguration> userConfigurationDictionaryAdapter2 = new UserConfigurationDictionaryAdapter <MailboxCalendarConfiguration>(session.MailboxSession, "Calendar", new GetUserConfigurationDelegate(UserConfigurationHelper.GetCalendarConfiguration), MailboxCalendarConfiguration.calendarProperties))
             {
                 workingHoursAdapter.Save(this);
                 userConfigurationDictionaryAdapter.Save(this);
                 userConfigurationDictionaryAdapter2.Save(this);
                 base.ResetChangeTracking();
             }
         }
     }
 }