public static long Log(SVNMonitor.EventLogEntryType type, string message, object sourceObject, Exception ex) { if ((ex != null) && KnownIssuesHelper.IsKnownIssue(ex)) { return 0L; } Logger.Log.InfoFormat("Event-Log: Type={0}, Message={1}, HasException={2}", type, message, ex != null); SVNMonitor.EventLogEntry tempLocal0 = new SVNMonitor.EventLogEntry { DateTime = DateTime.Now, Type = type, Message = message, SourceObject = sourceObject, Exception = ex }; SVNMonitor.EventLogEntry entry = tempLocal0; List.Add(entry); OnAfterLog(); return entry.ID; }
public static List<SVNMonitor.EventLogEntry> Search(string text) { if (string.IsNullOrEmpty(text)) { return List; } List<SVNMonitor.EventLogEntry> list = new List<SVNMonitor.EventLogEntry>(); SVNMonitor.EventLogEntry[] listCopy = new SVNMonitor.EventLogEntry[List.Count]; List.CopyTo(listCopy); for (int i = 0; i < listCopy.Length; i++) { SVNMonitor.EventLogEntry entry = listCopy[i]; if (entry.Message.ToLower().Contains(text.ToLower())) { list.Add(entry); } } return list; }