internal void Load(MailboxSession mailboxSession, IList <UserConfigurationPropertyDefinition> properties, bool ignoreOverQuotaException) { try { using (IReadableUserConfiguration readOnlyConfiguration = this.GetReadOnlyConfiguration(mailboxSession)) { if (readOnlyConfiguration != null) { IDictionary dictionary = readOnlyConfiguration.GetDictionary(); for (int i = 0; i < properties.Count; i++) { UserConfigurationPropertyDefinition userConfigurationPropertyDefinition = properties[i]; object originalValue = dictionary[userConfigurationPropertyDefinition.PropertyName]; this.optionProperties[userConfigurationPropertyDefinition] = userConfigurationPropertyDefinition.GetValidatedProperty(originalValue); ExTraceGlobals.UserOptionsDataTracer.TraceDebug((long)this.GetHashCode(), "Loaded property: {0}", new object[] { this.optionProperties[userConfigurationPropertyDefinition] }); } } } } catch (QuotaExceededException ex) { ExTraceGlobals.UserContextCallTracer.TraceDebug <string>(0L, "UserConfigurationBaseType: Load failed. Exception: {0}", ex.Message); if (!ignoreOverQuotaException) { throw; } } }
private void LoadUserConfigurationToConfigObject(string userConfigurationName, XsoMailboxConfigurationObject configObject) { using (IReadableUserConfiguration readableUserConfiguration = this.getReadOnlyUserConfiguration(base.MailboxSession, userConfigurationName, UserConfigurationTypes.Dictionary, false)) { if (readableUserConfiguration != null) { IDictionary dictionary = readableUserConfiguration.GetDictionary(); foreach (PropertyDefinition propertyDefinition in configObject.Schema.AllProperties) { XsoDictionaryPropertyDefinition xsoDictionaryPropertyDefinition = propertyDefinition as XsoDictionaryPropertyDefinition; if (xsoDictionaryPropertyDefinition != null && !(xsoDictionaryPropertyDefinition.UserConfigurationName != userConfigurationName) && dictionary.Contains(xsoDictionaryPropertyDefinition.Name)) { configObject.propertyBag.SetField(xsoDictionaryPropertyDefinition, StoreValueConverter.ConvertValueFromStore(xsoDictionaryPropertyDefinition, dictionary[xsoDictionaryPropertyDefinition.Name])); } } } } }
// Token: 0x06001665 RID: 5733 RVA: 0x0007E184 File Offset: 0x0007C384 private System.DayOfWeek LoadFirstDayOfWeek() { ExTraceGlobals.HeuristicsTracer.TraceFunction(0L, "ReminderTimeCalculatorContext.LoadFirstDayOfWeek"); using (IReadableUserConfiguration readOnlyMailboxConfiguration = UserConfigurationHelper.GetReadOnlyMailboxConfiguration(this.session as MailboxSession, "OWA.UserOptions", UserConfigurationTypes.Dictionary, false)) { if (readOnlyMailboxConfiguration != null) { IDictionary dictionary = readOnlyMailboxConfiguration.GetDictionary(); object obj = dictionary[MailboxCalendarConfigurationSchema.WeekStartDay.Name]; if (obj != null) { ExTraceGlobals.HeuristicsTracer.TraceDebug(0L, "Found first day of week: {0}", new object[] { obj }); return((System.DayOfWeek)obj); } ExTraceGlobals.HeuristicsTracer.TraceDebug(0L, "WeekStartDay is null on config object"); } } ExTraceGlobals.HeuristicsTracer.TraceDebug(0L, "Unable to determine first day of week"); return(System.DayOfWeek.Sunday); }