/// <summary> /// Constructs a new GCodeReader from a Stream object of g-code text file. /// </summary> /// <param name="file">Stream object of g-code text file</param> public GCodeReader(Stream file) { Code = new GCodeCollector(); string line; using (StreamReader text = new StreamReader(file)) { while ((line = text.ReadLine()) != null) { IGCode row = Read(line); if (row != null) { Code.addCode(row); } } } }
/// <summary> /// Appends the specified element to the end of this list. /// </summary> /// <param name="code">element to be appended to this list</param> public void addCode(IGCode code) { Codes.Add(code); }