RegisterOneLog() private method

private RegisterOneLog ( RawLogFileMonitorOccurence fileOccurrence, bool newOccurrence, long streamOffset, IMulticastLogEntry log ) : LiveIndexedMonitor
fileOccurrence RawLogFileMonitorOccurence
newOccurrence bool
streamOffset long
log IMulticastLogEntry
return LiveIndexedMonitor
            void UpdateMonitor(MultiLogReader reader, long streamOffset, Dictionary <string, RawLogFileMonitorOccurence> monitorOccurrence, List <RawLogFileMonitorOccurence> monitorOccurenceList, IMulticastLogEntry log)
            {
                bool newOccurrence = false;

                if (!monitorOccurrence.TryGetValue(log.MonitorId, out RawLogFileMonitorOccurence? occ))
                {
                    occ = new RawLogFileMonitorOccurence(this, log.MonitorId, streamOffset);
                    monitorOccurrence.Add(log.MonitorId, occ);
                    monitorOccurenceList.Add(occ);
                    newOccurrence = true;
                }
                if (occ.FirstEntryTime > log.LogTime)
                {
                    occ.FirstEntryTime = log.LogTime;
                }
                if (occ.LastEntryTime < log.LogTime)
                {
                    occ.LastEntryTime = log.LogTime;
                }
                occ.LastOffset = streamOffset;
                reader.RegisterOneLog(occ, newOccurrence, streamOffset, log);
            }
Example #2
0
 void UpdateMonitor( MultiLogReader reader, long streamOffset, Dictionary<Guid, RawLogFileMonitorOccurence> monitorOccurrence, List<RawLogFileMonitorOccurence> monitorOccurenceList, IMulticastLogEntry log )
 {
     bool newOccurrence = false;
     RawLogFileMonitorOccurence occ;
     if( !monitorOccurrence.TryGetValue( log.MonitorId, out occ ) )
     {
         occ = new RawLogFileMonitorOccurence( this, log.MonitorId, streamOffset );
         monitorOccurrence.Add( log.MonitorId, occ );
         monitorOccurenceList.Add( occ );
         newOccurrence = true;
     }
     if( occ.FirstEntryTime > log.LogTime ) occ.FirstEntryTime = log.LogTime;
     if( occ.LastEntryTime < log.LogTime ) occ.LastEntryTime = log.LogTime;
     occ.LastOffset = streamOffset;
     reader.RegisterOneLog( occ, newOccurrence, streamOffset, log );
 }