示例#1
0
        private static void GetCodeBlock(string codeText, CodeContainer container)
        {
            var codeTextBlocks = codeText.SplitByRowCount(container.LinesPerContainer);

            foreach (var block in codeTextBlocks)
            {
                container.Blocks.Add(CodeBlockWrapper(block));
            }
        }
示例#2
0
        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;
        }