Esempio n. 1
0
        public WhereAdjuster(SplitType[] types)
        {
            _splitTypes = new Dictionary <Type, SplitType>();
            foreach (var e in types)
            {
                e.RootExpr          = Expression.Parameter(e.Type, "");
                _splitTypes[e.Type] = e;
                if (e.Tag == "DEFAULT")
                {
                    _defaultType = e;
                }
            }

            _remaper = new RemapEntities(_splitTypes);

            _allowedFunctions = new HashSet <string>(new string[] { "Contains", "Any", "StartsWith", "PatIndex" });
            _allLiterals      = new Dictionary <string, QLiteral>();
        }
Esempio n. 2
0
 public Expression remap(Expression exp, SplitType rootType) //, ParameterExpression thisExpr)
 {
     _thisExpresion = rootType.RootExpr;
     return(Visit(exp));
 }