public Expression Build()
        {
            this.Parameters.Add
            (
                ParameterName,
                Expression.Parameter(SourceElementType, ParameterName)
            );

            var expression = Expression.Lambda
                             (
                typeof(Func <,>).MakeGenericType
                (
                    new Type[]
            {
                this.Parameters[ParameterName].Type,
                typeof(bool)
            }
                ),
                ConvertBody(FilterBody.Build()),
                this.Parameters[ParameterName]
                             );

            this.Parameters.Remove(ParameterName);

            return(expression);
        }
示例#2
0
 public void Init()
 {
     instance = new FilterBody();
 }
示例#3
0
 public void Init()
 {
     instance = new FilterBody();
 }