private List <TestBlock> GetTestBlock(string[] content) { int numTestBlocks; int enterPoint = 1; List <TestBlock> testBlocks = new List <TestBlock>(); numTestBlocks = Processing.ConvertStrToInt(content[0]); for (int i = 0; i < numTestBlocks; i++) { TestBlock regTestBlock = Processing.GetBlockFromContent(content, ref enterPoint); testBlocks.Add(regTestBlock); } return(testBlocks); }
private string[] GetContent(string fileName) //TODO: надо ли передовать параметры или можно напрямую обратиться к полю? { string s = string.Empty; string[] content = null; try { StreamReader sr = new StreamReader(fileName); s = sr.ReadToEnd(); sr.Close(); } catch (Exception e) { throw e; } Processing.CheckNullOrEmpty(s); content = s.Split(new string[] { "\r\n" }, StringSplitOptions.None); return(content); }