private void SetRegionalConfiguration()
        {
            MailboxRegionalConfiguration mailboxRegionalConfiguration = new MailboxRegionalConfiguration
            {
                TimeZone  = ExTimeZoneValue.Parse("Pacific Standard Time"),
                Principal = this.MailboxPrincipal
            };

            mailboxRegionalConfiguration.Save(this.mailboxStoreTypeProvider);
        }
示例#2
0
 internal static ExTimeZone GetExTimeZoneValue(object objectValue, ref Exception ex)
 {
     try
     {
         if (ExTimeZone.UtcTimeZone.Id.Equals((string)objectValue, StringComparison.Ordinal))
         {
             return(ExTimeZone.UtcTimeZone);
         }
         return(ExTimeZoneValue.Parse((string)objectValue).ExTimeZone);
     }
     catch (FormatException ex2)
     {
         ex = ex2;
     }
     return(null);
 }
        // Token: 0x060009EB RID: 2539 RVA: 0x00041B1C File Offset: 0x0003FD1C
        internal static VoiceNotificationSettings ParseVoiceSettingsItemBody(string body)
        {
            VoiceNotificationSettings result;

            using (StringReader stringReader = new StringReader(body))
            {
                if (!string.Equals(SettingsItemBodyParser.GetNextLine(stringReader), "V1.0"))
                {
                    SettingsItemBodyParser.Tracer.TraceDebug(0L, "Unknown user  voice settings version, skipped");
                    throw new FormatException();
                }
                ExTimeZoneValue           timeZone    = new ExTimeZoneValue(SettingsItemBodyParser.GetNextTimeZone(stringReader));
                bool                      nextBoolean = SettingsItemBodyParser.GetNextBoolean(stringReader);
                VoiceNotificationSettings voiceNotificationSettings = new VoiceNotificationSettings(nextBoolean, timeZone);
                result = voiceNotificationSettings;
            }
            return(result);
        }
            // Token: 0x06000019 RID: 25 RVA: 0x00002958 File Offset: 0x00000B58
            public override PropertyConstraintViolationError Validate(object value, PropertyDefinition propertyDefinition, IPropertyBag propertyBag)
            {
                string text = value.ToString();

                if (string.IsNullOrEmpty(text))
                {
                    return(new PropertyConstraintViolationError(DataStrings.ConstraintViolationValueIsNullOrEmpty, propertyDefinition, value, this));
                }
                try
                {
                    if (ExTimeZone.UtcTimeZone.Id.Equals(text, StringComparison.Ordinal))
                    {
                        return(null);
                    }
                    ExTimeZoneValue.Parse(text);
                }
                catch (FormatException)
                {
                    return(new PropertyConstraintViolationError(DataStrings.ConstraintViolationEnumValueNotAllowed(value.ToString()), propertyDefinition, value, this));
                }
                return(null);
            }
示例#5
0
 // Token: 0x06000A8B RID: 2699 RVA: 0x00045275 File Offset: 0x00043475
 internal VoiceNotificationSettings(bool voiceNotificationEnabled, ExTimeZoneValue timeZone)
 {
     this.Enabled  = voiceNotificationEnabled;
     this.TimeZone = timeZone;
 }