public IFlatFileReader Instantiate(string fileExtension, IFlatFileProfile profile) { if (string.IsNullOrEmpty(fileExtension)) { var csvProfile = new CsvProfile(profile.Attributes); return(new CsvReader(csvProfile)); } if (Readers.ContainsKey(fileExtension)) { return(Instantiate(Readers[fileExtension])); } else if (Readers.ContainsKey("*.*")) { return(Instantiate(Readers["*.*"])); } throw new ArgumentException(); }
public CsvReader(CsvProfile profile, int bufferSize) : base(profile, bufferSize) { base.ProgressStatusChanged += (s, e) => ProgressStatusChanged?.Invoke(this, new ProgressStatusEventArgs(e.Status, e.Progress.Current, e.Progress.Total)); }
public CsvReader(CsvProfile profile) : this(profile, 512) { }