private static void GetCodeBlock(string codeText, CodeContainer container) { var codeTextBlocks = codeText.SplitByRowCount(container.LinesPerContainer); foreach (var block in codeTextBlocks) { container.Blocks.Add(CodeBlockWrapper(block)); } }
public static CodeContainer Prepare(string filePath) { var container = new CodeContainer(); using (var reader = new StreamReader(filePath)) { var codeText = reader.ReadToEnd(); GetCodeBlock(codeText, container); } return container; }