// Token: 0x06000E0F RID: 3599 RVA: 0x00055318 File Offset: 0x00053518 private void MarkMailboxForUpgrade(MailboxSession mbxSession, CalendarRepairAssistantLogEntry logEntry) { try { CalendarUpgrade.CalendarUpgradeStatus calendarUpgradeStatus = CalendarUpgrade.MarkMailboxForUpgrade(mbxSession, new XSOFactory()); CalendarRepairAssistant.Tracer.TraceDebug <Guid, CalendarUpgrade.CalendarUpgradeStatus>((long)this.GetHashCode(), "MarkMailboxForUpgrade MailboxGuid:{0} UpgradeStatus:{1}", mbxSession.MailboxGuid, calendarUpgradeStatus); logEntry.UpgradeStatus = calendarUpgradeStatus.ToString(); } catch (LocalizedException ex) { CalendarRepairAssistant.Tracer.TraceError <Guid, LocalizedException>((long)this.GetHashCode(), "MarkMailboxForUpgrade MailboxGuid:{0} Exception:{1}", mbxSession.MailboxGuid, ex); logEntry.AddExceptionToLog(ex); } }
// Token: 0x06000E0C RID: 3596 RVA: 0x00054E78 File Offset: 0x00053078 protected override void InvokeInternal(InvokeArgs invokeArgs, List <KeyValuePair <string, object> > customDataToLog) { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); MailboxSession mailboxSession = invokeArgs.StoreSession as MailboxSession; if (mailboxSession == null) { return; } if (mailboxSession.MailboxOwner.RecipientTypeDetails != RecipientTypeDetails.UserMailbox && mailboxSession.MailboxOwner.RecipientTypeDetails != RecipientTypeDetails.LinkedMailbox && mailboxSession.MailboxOwner.RecipientTypeDetails != RecipientTypeDetails.GroupMailbox) { CalendarRepairAssistant.CachedStateTracer.TraceDebug <Guid, string, string>((long)this.GetHashCode(), "Skipping mailbox with guid {0} and display name {1} since this is a {2} and not a UserMailbox or a LinkedMailbox", mailboxSession.MailboxGuid, mailboxSession.MailboxOwner.MailboxInfo.DisplayName, mailboxSession.MailboxOwner.RecipientTypeDetails.ToString()); return; } ExDateTime now = ExDateTime.Now; ExDateTime rangeStart = now.AddDays((double)(-(double)this.RepairPolicy.DaysInWindowBackward)); ExDateTime rangeEnd = now.AddDays((double)this.RepairPolicy.DaysInWindowForward); CachedState cachedState = AssistantsService.CachedObjectsList.GetCachedState(mailboxSession.MailboxGuid); bool flag = ResourceCheck.DetailedCheckForAutomatedBooking(mailboxSession, cachedState); if (flag) { CalendarRepairAssistant.CachedStateTracer.TraceDebug((long)this.GetHashCode(), "{0}: Calendar Repair Assistant is skipping resource mailbox.", new object[] { TraceContext.Get() }); return; } CalendarRepairAssistantLogEntry calendarRepairAssistantLogEntry = new CalendarRepairAssistantLogEntry { DatabaseGuid = mailboxSession.MailboxOwner.MailboxInfo.GetDatabaseGuid(), MailboxGuid = mailboxSession.MailboxGuid, TenantGuid = mailboxSession.MailboxOwner.MailboxInfo.OrganizationId.GetTenantGuid(), RepairMode = this.RepairPolicy.RepairMode.ToString(), RangeStartTime = string.Format("{0:O}", rangeStart.ToUtc()), RangeEndTime = string.Format("{0:O}", rangeEnd.ToUtc()) }; this.MarkMailboxForUpgrade(mailboxSession, calendarRepairAssistantLogEntry); try { CalendarRepairAssistant.CachedStateTracer.TraceDebug <object, string>((long)this.GetHashCode(), "{0}: Calendar Repair Assistant starting to validate mailbox: {1}.", TraceContext.Get(), mailboxSession.MailboxOwner.MailboxInfo.DisplayName); CalendarValidator calendarValidator = CalendarValidator.CreateRepairingInstance(mailboxSession, rangeStart, rangeEnd, this.RepairPolicy, CalendarRepairAssistant.cvsPopulationTimeout); calendarValidator.OnItemInspected += this.incrementTotalItemsInspected; calendarValidator.OnItemRepaired += this.incrementTotalItemsRepaired; List <MeetingValidationResult> validationResults = calendarValidator.Run(); calendarValidator.OnItemInspected -= this.incrementTotalItemsInspected; calendarValidator.OnItemRepaired -= this.incrementTotalItemsRepaired; calendarRepairAssistantLogEntry.AddValidationResults(validationResults); CalendarRepairLogger.Instance.Log(validationResults, mailboxSession.MailboxOwner, rangeStart, rangeEnd); if (CalendarRepairAssistant.IsCRAReliabilityLoggerEnabled(mailboxSession)) { CalendarReliabilityInsigntLogger.Instance.Log(calendarRepairAssistantLogEntry, validationResults); } CalendarRepairAssistant.CachedStateTracer.TraceDebug <object, string>((long)this.GetHashCode(), "{0}: Calendar Repair Assistant completed validating mailbox: {1}.", TraceContext.Get(), mailboxSession.MailboxOwner.MailboxInfo.DisplayName); } catch (WrongServerException ex) { string message = string.Format("Could not access the mailbox (ExchangePrincipal:'{0}'). Exception: {1}.", mailboxSession.MailboxOwner, ex); CalendarRepairAssistant.Tracer.TraceDebug((long)this.GetHashCode(), message); calendarRepairAssistantLogEntry.AddExceptionToLog(ex); } catch (MailboxUserNotFoundException ex2) { CalendarRepairAssistant.Tracer.TraceDebug <MailboxUserNotFoundException>((long)this.GetHashCode(), "MailboxUserNotFoundException:{0}", ex2); calendarRepairAssistantLogEntry.AddExceptionToLog(ex2); } catch (CorruptDataException ex3) { CalendarRepairAssistant.Tracer.TraceDebug <CorruptDataException>((long)this.GetHashCode(), "CorruptDataException:{0}", ex3); calendarRepairAssistantLogEntry.AddExceptionToLog(ex3); } catch (SubmissionQuotaExceededException ex4) { CalendarRepairAssistant.Tracer.TraceDebug <SubmissionQuotaExceededException>((long)this.GetHashCode(), "SubmissionQuotaExceededException:{0}", ex4); calendarRepairAssistantLogEntry.AddExceptionToLog(ex4); } catch (StoragePermanentException ex5) { CalendarRepairAssistant.Tracer.TraceDebug <StoragePermanentException>((long)this.GetHashCode(), "StoragePermanentException:{0}", ex5); calendarRepairAssistantLogEntry.AddExceptionToLog(ex5); } catch (Exception ex6) { CalendarRepairAssistant.Tracer.TraceDebug <Exception>((long)this.GetHashCode(), "Exception:{0}", ex6); calendarRepairAssistantLogEntry.AddExceptionToLog(ex6); throw ex6; } finally { stopwatch.Stop(); calendarRepairAssistantLogEntry.TotalProcessingTime = stopwatch.Elapsed.TotalMilliseconds.ToString(); customDataToLog.AddRange(calendarRepairAssistantLogEntry.FormatCustomData()); } }
// Token: 0x06000DE6 RID: 3558 RVA: 0x000544EC File Offset: 0x000526EC internal void Log(CalendarRepairAssistantLogEntry logEntry, List <MeetingValidationResult> validationResults) { foreach (MeetingValidationResult meetingValidationResult in validationResults) { LogRowFormatter logRowFormatter = new LogRowFormatter(this.logSchema); logRowFormatter[1] = ((LocalServerCache.LocalServer == null) ? string.Empty : LocalServerCache.LocalServer.Name); logRowFormatter[2] = ((logEntry.MailboxGuid == Guid.Empty) ? string.Empty : logEntry.MailboxGuid.ToString("D")); logRowFormatter[3] = ((logEntry.TenantGuid == Guid.Empty) ? string.Empty : logEntry.TenantGuid.ToString("D")); logRowFormatter[4] = (meetingValidationResult.GlobalObjectId.ToString() ?? string.Empty); logRowFormatter[12] = meetingValidationResult.MeetingData.CalendarItemType.ToString(); logRowFormatter[5] = (meetingValidationResult.MailboxUserPrimarySmtpAddress ?? string.Empty); logRowFormatter[6] = (meetingValidationResult.Subject ?? string.Empty); logRowFormatter[7] = meetingValidationResult.CreationTime; logRowFormatter[8] = meetingValidationResult.StartTime; logRowFormatter[9] = meetingValidationResult.EndTime; logRowFormatter[10] = meetingValidationResult.NumberOfDelegates; logRowFormatter[11] = meetingValidationResult.WasValidationSuccessful; logRowFormatter[13] = meetingValidationResult.IsConsistent; logRowFormatter[14] = meetingValidationResult.IsDuplicate; logRowFormatter[15] = meetingValidationResult.DuplicatesDetected; logRowFormatter[16] = meetingValidationResult.IsDuplicateRemoved; logRowFormatter[17] = meetingValidationResult.IsOrganizer; logRowFormatter[18] = ((meetingValidationResult.ResultsPerAttendee == null) ? 0 : meetingValidationResult.ResultsPerAttendee.Count); string value = this.FormatDictionaryToString((from x in meetingValidationResult.ResultsPerAttendee.Values.SelectMany((MeetingComparisonResult mcr) => mcr.CheckResultList.SelectMany((ConsistencyCheckResult cr) => from i in cr.Inconsistencies where i.ShouldFix select i)) group x by new { x.Flag, x.Owner } into y select new { Item = y.Key.Flag.ToString(), Owner = y.Key.Owner.ToString(), Count = y.Count <Inconsistency>() }).ToDictionary(z => z.Item + "-" + z.Owner, z => z.Count)); string value2 = this.FormatDictionaryToString((from x in meetingValidationResult.ResultsPerAttendee.Values.SelectMany((MeetingComparisonResult mcr) => mcr.CheckResultList.SelectMany((ConsistencyCheckResult cr) => from i in cr.Inconsistencies where !i.ShouldFix select i)) group x by new { x.Flag, x.Owner } into y select new { Item = y.Key.Flag.ToString(), Owner = y.Key.Owner.ToString(), Count = y.Count <Inconsistency>() }).ToDictionary(z => z.Item + "-" + z.Owner, z => z.Count)); logRowFormatter[19] = value; logRowFormatter[20] = value2; lock (this.lockObject) { if (this.IsLoggerDisposed) { break; } this.log.Append(logRowFormatter, this.TimestampField); } } }