Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshClose committed Jan 26, 2024
1 parent 2758f5c commit bf460ac
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
20 changes: 11 additions & 9 deletions src/CsvHelper/CsvWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@
// This file is a part of CsvHelper and is dual licensed under MS-PL and Apache 2.0.
// See LICENSE.txt for details or visit http://www.opensource.org/licenses/ms-pl.html for MS-PL and http://opensource.org/licenses/Apache-2.0 for Apache 2.0.
// https://github.com/JoshClose/CsvHelper
using CsvHelper.Configuration;
using CsvHelper.Expressions;
using CsvHelper.TypeConversion;
using System;
using System.Buffers;
using System.Collections;
using System.Collections.Generic;
using System.Dynamic;
using System.Globalization;
using System.IO;
using System.Reflection;
using CsvHelper.Configuration;
using CsvHelper.TypeConversion;
using System.Linq;
using System.Linq.Expressions;
using System.Dynamic;
using System.Threading.Tasks;
using CsvHelper.Expressions;
using System.Globalization;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using System.Buffers;
using System.Threading;
using System.Threading.Tasks;

#pragma warning disable 649
#pragma warning disable 169
Expand Down Expand Up @@ -795,6 +794,7 @@ private bool WriteHeader<T>(IEnumerable<T> records)
if (!isPrimitive && recordType != typeof(object))
{
WriteHeader(recordType);

return hasHeaderBeenWritten;
}

Expand Down Expand Up @@ -829,6 +829,7 @@ private bool WriteHeader(object record)
if (record is IDynamicMetaObjectProvider dynamicObject)
{
WriteDynamicHeader(dynamicObject);

return true;
}

Expand All @@ -837,6 +838,7 @@ private bool WriteHeader(object record)
if (!isPrimitive)
{
WriteHeader(recordType);

return true;
}

Expand Down
15 changes: 7 additions & 8 deletions tests/CsvHelper.Tests/CsvWriterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@
// This file is a part of CsvHelper and is dual licensed under MS-PL and Apache 2.0.
// See LICENSE.txt for details or visit http://www.opensource.org/licenses/ms-pl.html for MS-PL and http://opensource.org/licenses/Apache-2.0 for Apache 2.0.
// https://github.com/JoshClose/CsvHelper
using CsvHelper.Configuration;
using CsvHelper.TypeConversion;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Dynamic;
using System.Globalization;
using System.IO;
using System.Text;
using CsvHelper.Configuration;
using CsvHelper.TypeConversion;
using Int32Converter = CsvHelper.TypeConversion.Int32Converter;
using System.Dynamic;
using Xunit;
using System.Threading;
using System.Collections;
using Xunit;
using Int32Converter = CsvHelper.TypeConversion.Int32Converter;

namespace CsvHelper.Tests
{

public class CsvWriterTests
{
public CsvWriterTests()
Expand Down

0 comments on commit bf460ac

Please sign in to comment.