コード例 #1
0
 public PrintInstructionLine Add(PrintInstructionLine printInstructionLine)
 {
     printInstructionLine.Instructions.ForEach(instruction =>
     {
         Instructions.Add(instruction);
     });
     return(this);
 }
コード例 #2
0
        public PrintInstructions Add(PrintInstructionLine printInstructionLine)
        {
            if (Lines.Count == 0)
            {
                Lines.Add(printInstructionLine);
                return(this);
            }

            printInstructionLine.Instructions.ForEach(instruction =>
            {
                Lines[_index].Add(instruction);
            });

            return(this);
        }