diff --git a/CsvPortable/CsvPortable/CsvPortable.csproj b/CsvPortable/CsvPortable/CsvPortable.csproj index 04e7781..5baecd5 100644 --- a/CsvPortable/CsvPortable/CsvPortable.csproj +++ b/CsvPortable/CsvPortable/CsvPortable.csproj @@ -5,7 +5,7 @@ enable enable Fabian Hering - 0.3.2 + 0.3.3 Simple, modular and powerful csv mapper. README.md https://github.com/Fabian918/CsvPortable diff --git a/CsvPortable/CsvPortable/Interfaces/ICsvPortable.cs b/CsvPortable/CsvPortable/Interfaces/ICsvPortable.cs index b4e19bb..9494cfe 100644 --- a/CsvPortable/CsvPortable/Interfaces/ICsvPortable.cs +++ b/CsvPortable/CsvPortable/Interfaces/ICsvPortable.cs @@ -399,9 +399,13 @@ void AddEntry(string entry) } } - public static async Task ToStream(List entries, Stream outputStream) + public static async Task ToStream(List entries, Stream outputStream, bool skipDefinition = false) { - await outputStream.WriteAsync(Encoding.UTF8.GetBytes(ICsvPortable.ExportDefinition())); + if (!skipDefinition) + { + await outputStream.WriteAsync(Encoding.UTF8.GetBytes(ICsvPortable.ExportDefinition())); + } + foreach (var entry in entries) { await outputStream.WriteAsync(Encoding.UTF8.GetBytes(ICsvPortable.ExportToCsvLine(entry)));