// Token: 0x06000096 RID: 150 RVA: 0x00004EAC File Offset: 0x000030AC public void OnProcessRow(object sender, ProcessRowEventArgs args) { if (!this.indexWasReadFromDisk) { try { this.IndexRow(args.Row); } catch (InvalidOperationException ex) { LogSearchService.Logger.LogEvent(MSExchangeTransportLogSearchEventLogConstants.Tuple_LogSearchLogFileCorrupted, this.logFilePath, new object[] { this.logFilePath }); ExTraceGlobals.ServiceTracer.TraceError <string>((long)this.GetHashCode(), "Logfile corrupt, skipping record: {0}", ex.ToString()); } catch (ArgumentOutOfRangeException ex2) { LogSearchService.Logger.LogEvent(MSExchangeTransportLogSearchEventLogConstants.Tuple_LogSearchServiceLogFileTooLarge, this.logFilePath, new object[] { this.logFilePath }); ExTraceGlobals.ServiceTracer.TraceError <string>((long)this.GetHashCode(), "Logfile corrupt, will not be indexed: {0}", ex2.ToString()); this.indexData.Clear(); } } }
// Token: 0x0600007B RID: 123 RVA: 0x00004774 File Offset: 0x00002974 private bool TryOpenAndProcessLogFile(out bool isAlreadyProcessed) { isAlreadyProcessed = false; FileStream fileStream = null; bool result; try { object obj; if (!this.TryCheckAlreadyProcessed(out isAlreadyProcessed)) { result = false; } else if (isAlreadyProcessed) { result = true; } else if (!IOHelper.TryIOOperation(new IOHelper.FileIOOperation(this.OpenLogFile), out obj)) { result = false; } else if (obj == null) { result = true; } else { CsvFieldCache cursor = ((LogFileInfo.OpenLogFileResult)obj).Cursor; fileStream = ((LogFileInfo.OpenLogFileResult)obj).FileStream; if (this.isActive && this.activeOffset != 0L) { cursor.Seek(this.activeOffset); } long position = cursor.Position; while (cursor.MoveNext(false)) { if (this.ProcessRow != null) { ReadOnlyRow readOnlyRow = new ReadOnlyRow(cursor, position); ProcessRowEventArgs args = new ProcessRowEventArgs(readOnlyRow); this.ProcessRow(this, args); } position = cursor.Position; } this.activeOffset = cursor.Position; this.length = cursor.Length; result = true; } } finally { if (fileStream != null) { fileStream.Close(); } } return(result); }
// Token: 0x0600016F RID: 367 RVA: 0x00009F88 File Offset: 0x00008188 private static void ProcessRow(object sender, ProcessRowEventArgs args) { if (EHALogSearchComponent.agentLogMonitorStarted) { LogFileInfo logFileInfo = sender as LogFileInfo; if (logFileInfo != null) { try { string field = args.Row.GetField <string>(EHALogSearchComponent.journalResponseColumnIndex); string strB = EHALogSearchComponent.RegexMatch(EHALogSearchComponent.JournalStatusParser.RxSTATUS, field).ToLower(); string senderAddress = EHALogSearchComponent.RegexMatch(EHALogSearchComponent.JournalStatusParser.RxSND, field); if (string.Compare(EHALogSearchComponent.Configuration.UnwrapProcessSuccess, strB, StringComparison.OrdinalIgnoreCase) == 0 || string.Compare(EHALogSearchComponent.Configuration.NDRProcessSuccess, strB, StringComparison.OrdinalIgnoreCase) == 0 || string.Compare(EHALogSearchComponent.Configuration.AlreadyProcessed, strB, StringComparison.OrdinalIgnoreCase) == 0 || string.Compare(EHALogSearchComponent.Configuration.PermanentError, strB, StringComparison.OrdinalIgnoreCase) == 0 || string.Compare(EHALogSearchComponent.Configuration.NoUsersResolved, strB, StringComparison.OrdinalIgnoreCase) == 0 || string.Compare(EHALogSearchComponent.Configuration.DropJournalReportWithoutNdr, strB, StringComparison.OrdinalIgnoreCase) == 0) { uint num = EHALogSearchComponent.Convert(EHALogSearchComponent.RegexMatch(EHALogSearchComponent.JournalStatusParser.RxRBS, field)); uint num2 = EHALogSearchComponent.Convert(EHALogSearchComponent.RegexMatch(EHALogSearchComponent.JournalStatusParser.RxRTO, field)); string text = EHALogSearchComponent.RegexMatch(EHALogSearchComponent.JournalStatusParser.RxRID, field); string recipientAddress = EHALogSearchComponent.RegexMatch(EHALogSearchComponent.JournalStatusParser.RxRCP, field); string text2 = EHALogSearchComponent.RegexMatch(EHALogSearchComponent.JournalStatusParser.RxExtOrgId, field); Guid empty = Guid.Empty; if (!Guid.TryParse(text2, out empty)) { throw new FormatException(string.Format(CultureInfo.InvariantCulture, "The value '{0}' of ExtOrgId segment is not in a recognized Guid format", new object[] { text2 })); } if (empty == Guid.Empty) { throw new FormatException(string.Format(CultureInfo.InvariantCulture, "The value '{0}' of ExtOrgId segment is Empty and it cannot be used for tenant attribution.", new object[] { text2 })); } Microsoft.Exchange.HostedServices.Archive.MetaReplication.ReplicationStatus defectiveStatus = EHALogSearchComponent.GetDefectiveStatus(field); if (0 < text.Length && 0U < num && 0U < num2) { EHALogSearchComponent.AddMessageCheckSend(senderAddress, recipientAddress, text, empty, num, num2, defectiveStatus); } } } catch (FormatException ex) { EHALogSearchComponent.logger.LogEvent(MSExchangeTransportLogSearchEventLogConstants.Tuple_TransportSyncLogEntryProcessingFailure, DateTime.UtcNow.Hour.ToString(), new object[] { ex }); } catch (ArgumentException ex2) { EHALogSearchComponent.logger.LogEvent(MSExchangeTransportLogSearchEventLogConstants.Tuple_TransportSyncLogEntryProcessingFailure, DateTime.UtcNow.Hour.ToString(), new object[] { ex2 }); } catch (NullReferenceException ex3) { EHALogSearchComponent.logger.LogEvent(MSExchangeTransportLogSearchEventLogConstants.Tuple_TransportSyncLogEntryProcessingFailure, DateTime.UtcNow.Hour.ToString(), new object[] { ex3 }); } } } }