private IEnumerable <output_product> ReadOutputProducts(int runInstanceId) { IEnumerable <output_product> outProducts; var cfg = new CsvConfiguration(); cfg.RegisterClassMap <OutputProductMap>(); using (var stream = _contentStorage.ReadOutputContent(runInstanceId, InputFileType.product)) { using (var textReader = new StreamReader(stream, ASCIIEncoding.ASCII)) //TODO: move encoding out { var csv = new CsvReader(textReader, cfg); outProducts = csv.GetRecords <output_product>().ToArray(); } } return(outProducts); }