public IEnumerable <OrderValidatable> Read() { using (var stream = GetFileStream(FileMode.Open)) using (var reader = new StreamReader(stream)) { IOrderParser parser = null; string line; var isFirstLine = true; while ((line = reader.ReadLine()) != null) { if (isFirstLine) { isFirstLine = false; parser = _parserFactory.Invoke(line.Split('\t')); } else { yield return(parser.Parse(line)); } } } }
///<exception cref = "NoParserException" /> public ProfileParser(string profilePath) { _parser = GetParser(profilePath); }
public FileWatcher(IOrderParser parser, IOrderOutputter outputter) { this.parser = parser; this.outputter = outputter; }
public OrderLoader(IOrderParser orderParser, IFileSystem fileSystem) { this.orderParser = orderParser; this.fileSystem = fileSystem; }