public CsvFile(string path, Encoding encoding, bool writeHeader = true, int buffer = 3600, bool append = true, char delimeter = ';' ) { FileWriter = new StreamWriter( path, append, encoding, buffer ); config = new CsvConfig(delimeter); if (writeHeader) { FileWriter.WriteLine( CsvFunctions.ToHeader( typeof(T), config ) ); } }
public Task WriteLineAsync(T lineElement) { return(FileWriter.WriteLineAsync( CsvFunctions.ToLine( lineElement, config ) )); }
public async Task WriteLinesAsync(IEnumerable <T> elements) { var enumerator = elements.GetEnumerator(); while (enumerator.MoveNext()) { await FileWriter.WriteLineAsync( CsvFunctions.ToLine( enumerator.Current, config ) ); } }