コード例 #1
0
ファイル: RiqlVisitor.cs プロジェクト: Reris/Riql
        public override IQueryable <T> VisitWhere(RiqlParser.WhereContext context)
        {
            var previous = base.VisitWhere(context);

            var where = context.GetText();

            if (!string.IsNullOrWhiteSpace(where))
            {
                var predicate = Riql.GetRsqlPredicate <T>(where, new ComparisonBuilder(this._propertyAccessor));
                this._current = previous.Where(predicate);
            }

            return(this._current);
        }
コード例 #2
0
ファイル: RiqlBaseVisitor.cs プロジェクト: Reris/Riql
 /// <summary>
 /// Visit a parse tree produced by <see cref="RiqlParser.where"/>.
 /// <para>
 /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/>
 /// on <paramref name="context"/>.
 /// </para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 /// <return>The visitor result.</return>
 public virtual Result VisitWhere([NotNull] RiqlParser.WhereContext context)
 {
     return(VisitChildren(context));
 }