Пример #1
0
        private void RemoveLast()
        {
            var index = _entries.Count - 1;

            lock (_syncRoot)
            {
                _entries.RemoveAt(index);
            }
            Listeners.Remove(index, 1);
        }
Пример #2
0
 private static void RemoveLinesFrom(LogBufferList lastLogBuffer, int currentSourceIndex)
 {
     while (lastLogBuffer.Count > 0)
     {
         int i        = lastLogBuffer.Count - 1;
         var logEntry = lastLogBuffer[i];
         if (logEntry.Index >= currentSourceIndex)
         {
             lastLogBuffer.RemoveAt(i);
         }
         else
         {
             break;
         }
     }
 }