Example #1
0
            private FilterImpl parse_or()
            {
                int lookahead = pos;

                SkipWhiteSpace();

                if (filterChars[pos] != '(')
                {
                    pos = lookahead - 1;
                    return(parse_item());
                }

                var operands = new ArrayList(10);

                while (filterChars[pos] == '(')
                {
                    FilterImpl child = parse_filter();
                    operands.Add(child);
                }
                var newArray = new FilterImpl[operands.Count];

                operands.CopyTo(newArray, 0);

                return(new FilterImpl(FilterImpl.OR, null, newArray));
            }
Example #2
0
            private FilterImpl parse_not()
            {
                int lookahead = pos;

                SkipWhiteSpace();

                if (filterChars[pos] != '(')
                {
                    pos = lookahead - 1;
                    return(parse_item());
                }

                FilterImpl child = parse_filter();

                return(new FilterImpl(FilterImpl.NOT, null, child));
            }
Example #3
0
 /// <summary>
 /// 创建过滤器对象
 /// </summary>
 /// <param name="filter"></param>
 /// <returns></returns>
 public IFilter createFilter(String filter)
 {
     return(FilterImpl.NewInstance(filter));
 }