Пример #1
0
 public ImmutableHashSet <object> VisitZenAdapterExpr <T1, T2>(ZenAdapterExpr <T1, T2> expression, Unit parameter)
 {
     return(LookupOrCompute(expression, () =>
     {
         return expression.Expr.Accept(this, parameter);
     }));
 }
Пример #2
0
        public Expression VisitZenAdapterExpr <T1, T2>(ZenAdapterExpr <T1, T2> expression, ExpressionConverterEnvironment parameter)
        {
            return(LookupOrCompute(expression, () =>
            {
                var expr = expression.Expr.Accept(this, parameter);
                foreach (var converter in expression.Converters)
                {
                    var method = converter.GetType().GetMethod("Invoke");
                    expr = Expression.Convert(Expression.Call(
                                                  Expression.Constant(converter),
                                                  method,
                                                  Expression.Convert(expr, typeof(object))), typeof(T1));
                }

                return expr;
            }));
        }
Пример #3
0
 public SymbolicValue <TModel, TVar, TBool, TInt, TString> VisitZenAdapterExpr <TTo, TFrom>(ZenAdapterExpr <TTo, TFrom> expression, SymbolicEvaluationEnvironment <TModel, TVar, TBool, TInt, TString> parameter)
 {
     return(LookupOrCompute(expression, () =>
     {
         return expression.Expr.Accept(this, parameter);
     }));
 }