using System; using System.Collections.Generic; using System.Diagnostics; using System.Formats.Asn1; using System.Globalization; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using CsvHelper; namespace WpfApp4.model { public class CSVDataProvider : LocalDataProvider,IDataProvider { private List HeroList; // конструктор класса public CSVDataProvider() { using (var reader = new StreamReader("./data.csv")) { using (var csv = new CsvReader( reader, CultureInfo.InvariantCulture)) { HeroList = csv.GetRecords().ToList(); } } } public IEnumerable getHero() { return HeroList; } } }