// Token: 0x060009F0 RID: 2544 RVA: 0x00041D6C File Offset: 0x0003FF6C
        private static int GetNextInteger(StringReader reader)
        {
            string nextLine = SettingsItemBodyParser.GetNextLine(reader);
            int    result;

            if (int.TryParse(nextLine, out result))
            {
                return(result);
            }
            throw new FormatException();
        }
        // Token: 0x060009F1 RID: 2545 RVA: 0x00041D94 File Offset: 0x0003FF94
        private static ExTimeZone GetNextTimeZone(StringReader reader)
        {
            ExTimeZone exTimeZone;

            if (!ExTimeZoneEnumerator.Instance.TryGetTimeZoneByName(SettingsItemBodyParser.GetNextLine(reader), out exTimeZone))
            {
                SettingsItemBodyParser.Tracer.TraceDebug(0L, "Unknown time zone, change to default");
                exTimeZone = ((ExTimeZoneValue)WorkingHoursSchema.WorkingHoursTimeZone.DefaultValue).ExTimeZone;
            }
            return(exTimeZone);
        }
        // Token: 0x060009EF RID: 2543 RVA: 0x00041D34 File Offset: 0x0003FF34
        private static bool GetNextBoolean(StringReader reader)
        {
            string nextLine = SettingsItemBodyParser.GetNextLine(reader);

            if (nextLine == "1")
            {
                return(true);
            }
            if (nextLine == "0")
            {
                return(false);
            }
            throw new FormatException();
        }
        // 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: 0x060009EC RID: 2540 RVA: 0x00041B98 File Offset: 0x0003FD98
        internal static TextNotificationSettings ParseTextSettingsItemBody(string body)
        {
            TextNotificationSettings result;

            using (StringReader stringReader = new StringReader(body))
            {
                if (SettingsItemBodyParser.GetNextLine(stringReader) != "V1.2")
                {
                    SettingsItemBodyParser.Tracer.TraceDebug(0L, "Unknown user settings version, skipped");
                    throw new FormatException();
                }
                MailboxRegionalConfiguration mailboxRegionalConfiguration = new MailboxRegionalConfiguration();
                mailboxRegionalConfiguration.TimeZone = new ExTimeZoneValue(SettingsItemBodyParser.GetNextTimeZone(stringReader));
                int nextInteger = SettingsItemBodyParser.GetNextInteger(stringReader);
                if (nextInteger != 0)
                {
                    mailboxRegionalConfiguration.Language = new CultureInfo(nextInteger);
                }
                mailboxRegionalConfiguration.TimeFormat = SettingsItemBodyParser.GetNextLine(stringReader);
                mailboxRegionalConfiguration.DateFormat = SettingsItemBodyParser.GetNextLine(stringReader);
                CalendarNotification calendarNotification = new CalendarNotification();
                calendarNotification.MeetingReminderNotification       = SettingsItemBodyParser.GetNextBoolean(stringReader);
                calendarNotification.MeetingReminderSendDuringWorkHour = SettingsItemBodyParser.GetNextBoolean(stringReader);
                calendarNotification.NextDays = SettingsItemBodyParser.GetNextInteger(stringReader);
                calendarNotification.CalendarUpdateNotification       = SettingsItemBodyParser.GetNextBoolean(stringReader);
                calendarNotification.CalendarUpdateSendDuringWorkHour = SettingsItemBodyParser.GetNextBoolean(stringReader);
                calendarNotification.DailyAgendaNotification          = SettingsItemBodyParser.GetNextBoolean(stringReader);
                calendarNotification.DailyAgendaNotificationSendTime  = TimeSpan.FromSeconds((double)SettingsItemBodyParser.GetNextInteger(stringReader));
                E164Number textMessagingPhoneNumber;
                if (!E164Number.TryParse(SettingsItemBodyParser.GetNextLine(stringReader), out textMessagingPhoneNumber))
                {
                    SettingsItemBodyParser.Tracer.TraceDebug(0L, "Invalid phone number, skipped");
                    throw new FormatException();
                }
                calendarNotification.TextMessagingPhoneNumber = textMessagingPhoneNumber;
                ExTimeZone          nextTimeZone = SettingsItemBodyParser.GetNextTimeZone(stringReader);
                int                 nextInteger2 = SettingsItemBodyParser.GetNextInteger(stringReader);
                int                 nextInteger3 = SettingsItemBodyParser.GetNextInteger(stringReader);
                int                 nextInteger4 = SettingsItemBodyParser.GetNextInteger(stringReader);
                StorageWorkingHours workingHours = StorageWorkingHours.Create(nextTimeZone, nextInteger2, nextInteger3, nextInteger4);
                result = new TextNotificationSettings(mailboxRegionalConfiguration, calendarNotification, workingHours);
            }
            return(result);
        }