Exemplo n.º 1
0
        Func <LogListViewItem, bool> MakeSearchPredicate(FindCommand findCommand)
        {
            var predicate = findCommand.Match <Func <LogListViewItem, bool> >(
                search =>
            {
                var regex = new Regex(search.Pattern, RegexOptions.IgnoreCase | RegexOptions.Compiled);
                return(item => regex.IsMatch(item.Message));
            },
                runtimeAtLeast => item => m_LogFormatProvider.GetTraceTimeInMs(item) >= runtimeAtLeast.Milliseconds
                );

            return(predicate);
        }