internal protected override void GenerateBuildCode(GeneratorContext ctx, CodeExpression var) { foreach (Action action in Actions) { // Create the action CodeExpression acVarExp = ctx.GenerateInstanceExpression(action, action.GenerateObjectCreation(ctx)); ctx.GenerateBuildCode(action, acVarExp); ctx.Statements.Add( new CodeMethodInvokeExpression( var, "Add", acVarExp, new CodePrimitiveExpression(action.Accelerator) ) ); } }
internal protected override void GenerateBuildCode (GeneratorContext ctx, CodeExpression var) { foreach (Action action in Actions) { // Create the action CodeExpression acVarExp = ctx.GenerateInstanceExpression (action, action.GenerateObjectCreation (ctx)); ctx.GenerateBuildCode (action, acVarExp); ctx.Statements.Add ( new CodeMethodInvokeExpression ( var, "Add", acVarExp, new CodePrimitiveExpression (action.Accelerator) ) ); } }