private bool CheckArrayIndexerExpression(ArrayIndexerExpression expression, VariableReference arrayVariable, int index)
 {
     if (expression.get_Target().get_CodeNodeType() != 26 || (object)(expression.get_Target() as VariableReferenceExpression).get_Variable() != (object)arrayVariable || expression.get_Indices().get_Count() != 1 || expression.get_Indices().get_Item(0).get_CodeNodeType() != 22)
     {
         return(false);
     }
     return(Convert.ToInt32((expression.get_Indices().get_Item(0) as LiteralExpression).get_Value()) == index);
 }
Exemplo n.º 2
0
 public override void VisitArrayIndexerExpression(ArrayIndexerExpression node)
 {
     this.Visit(node.get_Target());
     this.expressions.Push(0);
     this.Visit(node.get_Indices());
     dummyVar0 = this.expressions.Pop();
     return;
 }
Exemplo n.º 3
0
 public override ICodeNode VisitArrayIndexerExpression(ArrayIndexerExpression node)
 {
     node.set_Target((Expression)this.VisitTargetExpression(node.get_Target()));
     node.set_Indices((ExpressionCollection)this.Visit(node.get_Indices()));
     return(node);
 }