private List <ILineInfo> FormLinesList(string[] fileLines) { int lineCounter = 1; var lines = new List <ILineInfo>(fileLines.Length); if (fileLines != null) { for (int i = 0; i < fileLines.Length;) { ILineInfo linfo = new Mpl2LineInfo(); while (i < fileLines.Length && (fileLines[i] == "" || fileLines[i] == Environment.NewLine)) { i++; } if (i == fileLines.Length) { break; } if (fileLines[i].Length != 0) { linfo.LineNumber = lineCounter++; AssignTimeProperies(fileLines[i], ref linfo); int index = GetIndexOfLastTimecodeChar(fileLines[i]); linfo.Line = fileLines[i++].Trim().Substring(index + 1).Trim(); lines.Add(linfo); } } } return(lines); }
public void Setup() { lineInfo = new Mpl2LineInfo(); }