Inheritance: Signum.Engine.Linq.DbExpressionVisitor
 protected internal override Expression VisitProjection(ProjectionExpression proj)
 {
     if (proj != root)
         return AliasReplacer.Replace(base.VisitProjection(proj), aliasGenerator);
     else
         return (ProjectionExpression)base.VisitProjection(proj);
 }
Exemplo n.º 2
0
        public static Expression Replace(Expression source, AliasGenerator aliasGenerator)
        {
            var aliasMap = DeclaredAliasGatherer.GatherDeclared(source).Reverse().ToDictionary(a => a, aliasGenerator.CloneAlias);

            AliasReplacer ap = new AliasReplacer(aliasMap);

            return(ap.Visit(source));
        }
Exemplo n.º 3
0
        public static Expression Replace(Expression source, AliasGenerator aliasGenerator)
        {
            AliasReplacer ap = new AliasReplacer()
            {
                aliasMap = DeclaredAliasGatherer.GatherDeclared(source).Reverse().ToDictionary(a => a, aliasGenerator.CloneAlias)
            };

            return ap.Visit(source);
        }