public override bool Equals(Expression other) { if (other.CodeNodeType != CodeNodeType.DynamicIndexerExpression) { return(false); } DynamicIndexerExpression otherIndexer = other as DynamicIndexerExpression; return(this.Target.Equals(otherIndexer.Target) && this.Indices.Equals(otherIndexer.Indices)); }
public override Expression CloneExpressionOnly() { DynamicIndexerExpression result = new DynamicIndexerExpression(Target.CloneExpressionOnly(), Indices.CloneExpressionsOnly(), ExpressionType, null); return result; }
public override Expression Clone() { DynamicIndexerExpression result = new DynamicIndexerExpression(Target.Clone(), Indices.Clone(), ExpressionType, this.instructions); return result; }
public virtual void VisitDynamicIndexerExpression(DynamicIndexerExpression node) { VisitIIndexerExpression(node); }
private Expression GenerateSetIndexExpression(IList<Expression> arguments, IEnumerable<Instruction> instructions) { if (arguments.Count < 3) { throw new Exception("Invalid number of arguments for set index expression."); } DynamicIndexerExpression indexerExpression = new DynamicIndexerExpression(arguments[0], objectTypeRef, instructions); for (int i = 1; i < arguments.Count - 1; i++) { indexerExpression.Indices.Add(arguments[i]); } return new BinaryExpression(BinaryOperator.Assign, indexerExpression, arguments[arguments.Count - 1], typeSystem ,null); }
private Expression GenerateGetIndexExpression(IList<Expression> arguments, IEnumerable<Instruction> instructions) { if (arguments.Count < 2) { throw new Exception("Invalid number of arguments for get index expression."); } DynamicIndexerExpression indexerExpression = new DynamicIndexerExpression(arguments[0], objectTypeRef, instructions); for (int i = 1; i < arguments.Count; i++) { indexerExpression.Indices.Add(arguments[i]); } return indexerExpression; }
public override Expression CloneExpressionOnly() { DynamicIndexerExpression result = new DynamicIndexerExpression(Target.CloneExpressionOnly(), Indices.CloneExpressionsOnly(), ExpressionType, null); return(result); }
public override Expression Clone() { DynamicIndexerExpression result = new DynamicIndexerExpression(Target.Clone(), Indices.Clone(), ExpressionType, this.instructions); return(result); }