Tibialyzer.Hunt.IterateLogMessages C# (CSharp) Method

IterateLogMessages() public method

public IterateLogMessages ( ) : IEnumerable
return IEnumerable
        public IEnumerable<string> IterateLogMessages()
        {
            lock (huntLock) {
                List<string> timestamps = this.loot.logMessages.Keys.OrderByDescending(o => o).ToList();
                foreach (string t in timestamps) {
                    List<string> strings = this.loot.logMessages[t].ToList();
                    strings.Reverse();
                    foreach (string str in strings) {
                        yield return str;
                    }
                }
            }
        }

Usage Example

Example #1
0
 public void refreshHuntLog(Hunt h)
 {
     if (h == null) return;
     const int maxLogLines = 250;
     int count = 0;
     logMessageCollection.Items.Clear();
     foreach (string message in h.IterateLogMessages()) {
         logMessageCollection.Items.Add(message);
         if (count++ > maxLogLines) break;
     }
 }
All Usage Examples Of Tibialyzer.Hunt::IterateLogMessages