void AddRenderControl (ControlBuilder builder) { CodeIndexerExpression indexer = new CodeIndexerExpression (); indexer.TargetObject = new CodePropertyReferenceExpression ( new CodeArgumentReferenceExpression ("parameterContainer"), "Controls"); indexer.Indices.Add (new CodePrimitiveExpression (builder.RenderIndex)); CodeMethodInvokeExpression invoke = new CodeMethodInvokeExpression (indexer, "RenderControl"); invoke.Parameters.Add (new CodeArgumentReferenceExpression ("__output")); builder.RenderMethod.Statements.Add (invoke); builder.IncreaseRenderIndex (); }