public void RebuildDimensions(ref ExpressionCollection elements, ExpressionCollection dimensions) { V_0 = elements.get_Count(); V_1 = dimensions.get_Count() - 1; while (V_1 > 0) { V_2 = new ExpressionCollection(); V_3 = (Int32)(dimensions.get_Item(V_1) as LiteralExpression).get_Value(); V_4 = 0; while (V_4 < V_0) { V_5 = new BlockExpression(null); V_5.set_Expressions(new ExpressionCollection()); V_6 = 0; while (V_6 < V_3) { V_5.get_Expressions().Add(elements.get_Item(V_4 + V_6)); V_6 = V_6 + 1; } V_2.Add(V_5); V_4 = V_4 + V_3; } elements = V_2; V_0 = V_0 / V_3; V_1 = V_1 - 1; } return; }
private void AddArrayInitializerCasts(TypeDefinition arrayType, BlockExpression blockExpression) { V_0 = 0; while (V_0 < blockExpression.get_Expressions().get_Count()) { V_1 = blockExpression.get_Expressions().get_Item(V_0); if (V_1.get_CodeNodeType() != 18) { if (this.ShouldAddCast(arrayType, V_1.get_ExpressionType())) { blockExpression.get_Expressions().set_Item(V_0, new ExplicitCastExpression(V_1, arrayType, null)); } } else { this.AddArrayInitializerCasts(arrayType, V_1 as BlockExpression); } V_0 = V_0 + 1; } return; }
public virtual void VisitBlockExpression(BlockExpression node) { this.Visit(node.get_Expressions()); return; }
public virtual ICodeNode VisitBlockExpression(BlockExpression node) { node.set_Expressions((ExpressionCollection)this.Visit(node.get_Expressions())); return(node); }