Ejemplo n.º 1
0
        public virtual void Translate <TLeft, TRight>(IBinaryOperationExpression <TLeft, TRight> expression)
            where TLeft :
        INaryOperandExpression
            where TRight :
        INaryOperandExpression
        {
            switch (expression.Associativity)
            {
            case BinaryOperationAssociativity.Left:
                if (expression.LeftSide != null)
                {
                    expression.LeftSide.Accept(this);
                    Translate(expression.OperationKind);
                }
                expression.RightSide.Accept(this);
                break;

            case BinaryOperationAssociativity.Right:
                expression.LeftSide.Accept(this);
                if (expression.RightSide != null)
                {
                    Translate(expression.OperationKind);
                    expression.RightSide.Accept(this);
                }
                break;

            default:
                break;
            }
        }
Ejemplo n.º 2
0
 public TestLinkerResult Visit <TLeft, TRight>(IBinaryOperationExpression <TLeft, TRight> expression, ICompilationContext context)
     where TLeft :
 INaryOperandExpression
     where TRight :
 INaryOperandExpression
 {
     throw new NotImplementedException();
 }
 public override bool Visit <TLeft, TRight>(IBinaryOperationExpression <TLeft, TRight> expression, object context)
 {
     _stack.Push(expression);
     try
     {
         return(base.Visit(expression, context));
     }
     finally
     {
         _stack.Pop();
     }
 }
Ejemplo n.º 4
0
 public abstract IExpression Transform <TLeft, TRight>(IBinaryOperationExpression <TLeft, TRight> expression)
     where TLeft :
 INaryOperandExpression
     where TRight :
 INaryOperandExpression;
Ejemplo n.º 5
0
 void IExpressionVisitor.Visit <TLeft, TRight>(IBinaryOperationExpression <TLeft, TRight> expression)
 {
     this.Translate(expression);
 }
Ejemplo n.º 6
0
 TransformationImpact IExpressionVisitor <TransformationImpact> .Visit <TLeft, TRight>(IBinaryOperationExpression <TLeft, TRight> expression)
 {
     return(CalculateRefactorImpact(expression));
 }
Ejemplo n.º 7
0
 public abstract void TranslateExpression(IBinaryOperationExpression binOpExpression);
Ejemplo n.º 8
0
 public override void TranslateExpression(IBinaryOperationExpression binOpExpression)
 {
     this.Provider.GenerateCodeFromExpression(binOpExpression.GenerateCodeDom(this.Options), base.Target, this.Options.Options);
 }
Ejemplo n.º 9
0
 public abstract TransformationImpact CalculateRefactorImpact <TLeft, TRight>(IBinaryOperationExpression <TLeft, TRight> expression)
     where TLeft :
 INaryOperandExpression
     where TRight :
 INaryOperandExpression;
Ejemplo n.º 10
0
 public TransformationKind Visit <TLeft, TRight>(IBinaryOperationExpression <TLeft, TRight> expression, ITransformationContext context)
     where TLeft : INaryOperandExpression
     where TRight : INaryOperandExpression
 {
     return(TransformationKind.Investigate);
 }