Ejemplo n.º 1
0
 public IPredicateOperators Register(Func <Expression, LambdaExpression, Expression> factory)
 {
     _operators.Register(new SubsetOperator
     {
         Name       = _name,
         SourceType = typeof(IEnumerable),
         ResultType = _resultType,
         Expression = factory,
         Key        = _key
     });
     return(_operators);
 }
Ejemplo n.º 2
0
 public IPredicateOperators Register(Func <Expression, Type, TSource, BinaryExpression> factory)
 {
     _operators.Register(new PredicateOperator
     {
         Name       = _name,
         SourceType = _sourceType,
         ResultType = typeof(bool),
         Expression = (member, type, value) => factory(member, typeof(TSource), (TSource)value),
         Key        = _key
     });
     return(_operators);
 }