/// <summary> /// Creates a new serializer using the given <see cref="TextWriter"/> /// and <see cref="CsvConfiguration"/>. /// </summary> /// <param name="writer">The <see cref="TextWriter"/> to write the CSV file data to.</param> /// <param name="configuration">The configuration.</param> /// <param name="leaveOpen">true to leave the reader open after the CsvReader object is disposed, otherwise false.</param> public CsvSerializer(TextWriter writer, ICsvSerializerConfiguration configuration, bool leaveOpen) { if (writer == null) { throw new ArgumentNullException(nameof(writer)); } if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } this.writer = writer; this.configuration = configuration; this.leaveOpen = leaveOpen; }
/// <summary> /// Creates a new serializer using the given <see cref="TextWriter"/> /// and <see cref="CsvConfiguration"/>. /// </summary> /// <param name="writer">The <see cref="TextWriter"/> to write the CSV file data to.</param> /// <param name="configuration">The configuration.</param> /// <param name="leaveOpen">true to leave the reader open after the CsvReader object is disposed, otherwise false.</param> public CsvSerializer( TextWriter writer, ICsvSerializerConfiguration configuration, bool leaveOpen ) { if( writer == null ) { throw new ArgumentNullException( nameof( writer ) ); } if( configuration == null ) { throw new ArgumentNullException( nameof( configuration ) ); } this.writer = writer; this.configuration = configuration; this.leaveOpen = leaveOpen; }
/// <summary> /// Creates a new serializer using the given <see cref="TextWriter"/> /// and <see cref="CsvConfiguration"/>. /// </summary> /// <param name="writer">The <see cref="TextWriter"/> to write the CSV file data to.</param> /// <param name="configuration">The configuration.</param> public CsvSerializer(TextWriter writer, ICsvSerializerConfiguration configuration) : this(writer, configuration, false) { }
/// <summary> /// Creates a new serializer using the given <see cref="TextWriter"/> /// and <see cref="CsvConfiguration"/>. /// </summary> /// <param name="writer">The <see cref="TextWriter"/> to write the CSV file data to.</param> /// <param name="configuration">The configuration.</param> public CsvSerializer( TextWriter writer, ICsvSerializerConfiguration configuration ) : this(writer, configuration, false) { }