Пример #1
0
        public bool Matches(LogItem item, LogItemProperty property)
        {
            if (!_expectation.HasValue)
            {
                return(true);
            }

            return(_expectation.Value.Equals(item.Get(property)));
        }
Пример #2
0
        public bool Matches(LogItem item, LogItemProperty property)
        {
            if (filterValue == null)
            {
                return(true);
            }

            object given = item.Get(property);

            if (given == null || given.Equals(string.Empty))
            {
                return(true);
            }
            string g = given.ToString();

            if (ignoreCase)
            {
                g = g.ToLowerInvariant();
            }
            return(Test(g));
        }