コード例 #1
0
        public static IEnumerable <TSource> XWhere <TSource>(this IEnumerable <TSource> @this, Func <WhereHelperE <TSource>, WhereExp <TSource> > build)
        {
            var helper = new WhereHelperE <TSource>(@this);
            var exp    = build(helper).Exp;

            return(@this.Where(exp.Compile()));
        }
コード例 #2
0
        public static IEnumerable <TSource> XWhere <TSource>(this IEnumerable <TSource> @this, Func <WhereHelperE <TSource>, WhereExp <TSource> > build)
        {
            var helper   = new WhereHelperE <TSource>(@this);
            var whereExp = build(helper);

            if (whereExp?.Exp != null)
            {
                return(@this.Where(whereExp.Exp.Compile()));
            }
            else
            {
                return(@this);
            }
        }