public bool Match(LogEntry log) { bool stat = false; int MatchCount = 0; Filters.Iterate(delegate(LogFilter filter) { if (filter.Match(log)) { if (LinkWithAnd) { MatchCount++; return(false); } stat = true; return(true); } return(false); }); if (LinkWithAnd && Filters.Count == MatchCount) { stat = true; } return(stat); }
void LogcatProcess_OnLineOutputReceive(string line) { if (line == "DEVCON") { if (OnDeviceConnected != null) { OnDeviceConnected(); } return; } LogEntry entry = LogEntry.Parse(line); bool IsGeneralEntry = true; Slots.Iterate(delegate(FilteredLogSlot slot) { if (slot.TryAdd(entry)) { IsGeneralEntry = false; return(true); } IsGeneralEntry = true; return(false); }); if (IsGeneralEntry) { GeneralEntries.AddEntry(entry); if (GeneralTabUi.InvokeRequired) { GeneralTabUi.Invoke(new System.Windows.Forms.MethodInvoker(delegate() { GeneralTabUi.WriteLog(entry); })); } } }