diff --git a/docs/migration/index.html b/docs/migration/index.html new file mode 100644 index 000000000..03ee81b34 --- /dev/null +++ b/docs/migration/index.html @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + Migration | CsvHelper + + + + + + + + + + + + + + + + +
+
+ +
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v10/index.html b/docs/migration/v10/index.html new file mode 100644 index 000000000..5f3ca5159 --- /dev/null +++ b/docs/migration/v10/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V10 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v11/index.html b/docs/migration/v11/index.html new file mode 100644 index 000000000..d20d40012 --- /dev/null +++ b/docs/migration/v11/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V11 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v12/index.html b/docs/migration/v12/index.html new file mode 100644 index 000000000..b8cea3e4b --- /dev/null +++ b/docs/migration/v12/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V12 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v13/index.html b/docs/migration/v13/index.html new file mode 100644 index 000000000..cd63dcd25 --- /dev/null +++ b/docs/migration/v13/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V13 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v14/index.html b/docs/migration/v14/index.html new file mode 100644 index 000000000..6f4627e71 --- /dev/null +++ b/docs/migration/v14/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V14 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v15/index.html b/docs/migration/v15/index.html new file mode 100644 index 000000000..40a408e6f --- /dev/null +++ b/docs/migration/v15/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V15 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v16/index.html b/docs/migration/v16/index.html new file mode 100644 index 000000000..7f028dba0 --- /dev/null +++ b/docs/migration/v16/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V16 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v17/index.html b/docs/migration/v17/index.html new file mode 100644 index 000000000..33c7e116d --- /dev/null +++ b/docs/migration/v17/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V17 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v18/index.html b/docs/migration/v18/index.html new file mode 100644 index 000000000..3700d8eca --- /dev/null +++ b/docs/migration/v18/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V18 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v19/index.html b/docs/migration/v19/index.html new file mode 100644 index 000000000..ecfb01259 --- /dev/null +++ b/docs/migration/v19/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V19 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v2/index.html b/docs/migration/v2/index.html new file mode 100644 index 000000000..e787d5751 --- /dev/null +++ b/docs/migration/v2/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V2 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v20/index.html b/docs/migration/v20/index.html new file mode 100644 index 000000000..af1361e13 --- /dev/null +++ b/docs/migration/v20/index.html @@ -0,0 +1,344 @@ + + + + + + + + + + + + + + + + + + + + + + + V20 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Migrating from version 19 to 20

+

ConvertUsing

+

ConvertUsing was renamed to Convert.

+
// v19
+Map(m => m.Property).ConvertUsing(row => row.GetField<int>(0) + row.GetField<int>(1));
+
+// v20
+Map(m => m.Property).Convert(row => row.GetField<int>(0) + row.GetField<int>(1));
+
+

CsvConfiguration

+

All properties changed from get; set; to get; init;.

+
// v19
+var config = new CsvConfiguration(CultureInfo.InvariantCulture);
+config.Delimiter = ";";
+
+// v20
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	Delimiter = ";",
+}
+
+

CsvConfiguration changed from a class to a record.

+
// v19
+class MyConfig : CsvConfiguration {}
+
+// v20
+record MyConfig : CsvConfiguration {}
+
+

ShouldQuote

+

ShouldQuote now takes in IWriterRow instead of CsvContext.

+
// v19
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	ShouldQuote = (field, row) => true,
+};
+
+// v20
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	ShouldQuote = (field, context) => true,
+};
+
+

NewLine

+

Changed from enum NewLines to char?.

+
// v19
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	NewLine = NewLines.LF,
+};
+
+// v20
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	NewLine = '\n',
+};
+
+

NewLineString

+

This was removed. Any code referencing this should be deleted.

+

RegisterClassMap

+

This moved to CsvContext.

+
// v19
+csv.Configuration.RegisterClassMap<MyMap>();
+
+// v20
+csv.Context.RegisterClassMap<MyMap>();
+
+

UnregisterClassMap

+

This moved to CsvContext.

+
// v19
+csv.Configuration.UnregisterClassMap<MyMap>();
+
+// v20
+csv.Context.UnregisterClassMap<MyMap>();
+
+

AutoMap

+

This moved to CsvContext.

+
// v19
+csv.Configuration.AutoMap<MyType>();
+
+// v20
+csv.Context.AutoMap<MyType>();
+
+

IParserConfiguration

+

All setters removed.

+
// v19
+var config = new CsvConfiguration(CultureInfo.InvariantCulture);
+config.Delimiter = ";";
+
+// v20
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	Delimiter = ";",
+};
+
+
    +
  • Added bool CacheFields.
  • +
  • Added bool LeaveOpen.
  • +
  • Added char? NewLine.
  • +
  • Added ParserMode Mode.
  • +
  • Added char[] WhiteSpaceChars.
  • +
  • Removed bool IgnoreQuotes.
  • +
+

Any classes that implement IParserConfiguration will need these changes.

+

IReaderConfiguration

+

All setters removed.

+
// v19
+var config = new CsvConfiguration(CultureInfo.InvariantCulture);
+config.Delimiter = ";";
+
+// v20
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	Delimiter = ";",
+};
+
+
    +
  • Removed TypeConverterOptionsCache.
  • +
  • Removed TypeConverterCache.
  • +
  • Removed Maps.
  • +
  • Removed RegisterClassMap.
  • +
  • Removed UnregisterClassMap.
  • +
  • Removed AutoMap.
  • +
+

Any classes that implement IReaderConfiguration will need these changes.

+

ISerializerConfiguration

+

This interface was removed and it's properties were added to IWriteConfiguration.

+
// v19
+class MyConfig : ISerializerConfiguration {}
+
+// v20
+class MyConfig : IWriterConfiguration {}
+
+

IWriterConfiguration

+

All setters removed.

+
// v19
+var config = new CsvConfiguration(CultureInfo.InvariantCulture);
+config.Delimiter = ";";
+
+// v20
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	Delimiter = ";",
+};
+
+
    +
  • Removed QuoteString.
  • +
  • Removed TypeConverterCache.
  • +
  • Removed MemberTypes.
  • +
  • Removed Maps.
  • +
  • Removed RegisterClassMap.
  • +
  • Removed UnregisterClassMap.
  • +
  • Removed AutoMap.
  • +
+

Any classes that implement IWriterConfiguration will need these changes.

+

MemberMap

+

ConvertUsing renamed to Convert.

+
// v19
+Map(m => m.Property).ConvertUsing(row => row.Get(0));
+Map(m => m.Property).ConvertUsing(value => value?.ToString() ?? string.Empty);
+
+// v20
+Map(m => m.Property).Convert(row => row.Get(0));
+Map(m => m.Property).Convert(value => value?.ToString() ?? string.Empty);
+
+

CsvParser

+

string[] Read() changed to bool Read().

+
// v19
+string[] record;
+while ((record = parser.Read()) != null)
+{
+}
+
+// v20
+while (parser.Read())
+{
+	// Only get fields you need.
+	var field1 = parser[0];
+	var field2 = parser[1];
+
+	// Get all fields.
+	var record = parser.Record;
+}
+
+

Constructor paramter IFieldReader fieldReader removed from all constructors.

+
// v19
+var parser = new CsvParser(fieldReader);
+
+// v20
+var parser = new CsvParser();
+
+

CsvSerializer

+

Removed. Functionality moved into CsvWriter.

+

IFieldReader

+

Removed. Functionality moved into CsvParser.

+

IParser

+
    +
  • Added long ByteCount.
  • +
  • Added long CharCount.
  • +
  • Added int Count.
  • +
  • Added string this[int index].
  • +
  • Added string[] Record.
  • +
  • Added string RawRecord.
  • +
  • Added int Row.
  • +
  • Added int RawRow.
  • +
  • Changed string[] Read to bool Read.
  • +
  • Changed Task<string[]> ReadAsync to Task<bool> ReadAsync.
  • +
+

Any classes that implement IParser will need these changes.

+

IReader

+
    +
  • Removed ICsvParser Parser.
  • +
+

Any classes that implement IReader will need these changes.

+

IReaderRow

+
    +
  • Added int ColumnCount.
  • +
  • Added int CurrentIndex.
  • +
  • Added string[] HeaderRecord.
  • +
  • Added IParser Parser.
  • +
+

Any classes that implement IReaderRow will need these changes.

+

ISerializer

+

Removed. Functionality moved into IWriter.

+

IWriterRow

+
    +
  • Added string[] HeaderRecord.
  • +
  • Added int Row.
  • +
  • Added int Index.
  • +
+

RecordBuilder

+

Removed. Functionality moved into CsvWriter.

+

Caches

+

enum Caches was removed. Modifying internal caches is not supported anymore. +Any code referencing this should be removed.

+

ReadingContext/WritingContext

+

ReadingContext and WritingContext was merged into a single CsvContext. +Anywhere either of these was used should change to CsvContext.

+

Func/Action

+

Any place a Func or Action was used now has a dedicated delegate. +This should only affect classes that are inheriting ClassMap +or CsvConfiguration.

+

CsvFieldReader

+

Class removed. Code was wrapped into CsvParser.

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v21/index.html b/docs/migration/v21/index.html new file mode 100644 index 000000000..24f48a286 --- /dev/null +++ b/docs/migration/v21/index.html @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + V21 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Migrating from version 20 to 21

+

CsvConfiguration

+

Property char? NewLine changed to string NewLine.

+
// v20
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	NewLine = '\r',
+};
+
+// v21
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	NewLine = "\r",
+};
+
+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v22/index.html b/docs/migration/v22/index.html new file mode 100644 index 000000000..54a8217dd --- /dev/null +++ b/docs/migration/v22/index.html @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + V22 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Migrating from version 21 to 22

+

ParserMode

+

Name change to CsvMode.

+
// v21
+ParserMode.RFC4180
+
+//v22
+CsvMode.RFC4180
+
+

ShouldQuote

+
// v21
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	ShouldQuote = (field, context) => true,
+};
+
+// v22
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	ShouldQuote = (field, context, row) => true,
+};
+
+

EnumConverter

+

EnumConverter was changed to case sensitive by default.

+

If you want Enums to ignore case, you need to set a type converter option.

+
Map(m => m.Property).TypeConverterOption.EnumIgnoreCase();
+
+

IParserConfiguration

+
    +
  • Added ProcessFieldBufferSizse.
  • +
+

Any class that implements IParserConfiguration will need these changes applied to it.

+

IWriterConfiguration

+
    +
  • Added Mode.
  • +
+

Any class that implements IWriterConfiguration will need these changes applied to it.

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v23/index.html b/docs/migration/v23/index.html new file mode 100644 index 000000000..1904b2128 --- /dev/null +++ b/docs/migration/v23/index.html @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + V23 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Migrating from version 22 to 23

+

CsvConfiguration

+

All the constructor parameters were removed in favor of using +property setters. Apply this change to any of the options.

+
// v22
+var config = new CsvConfiguration(CultureInfo.InvariantCulture, delimiter = ";");
+
+// v23
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	Delimiter = ";",
+};
+
+

Delegates

+

All delegates now take in a single struct argument.

+

BadDataFound

+
// v22
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	BadDataFound = (field, context) => 
+	{
+		Console.WriteLine($"field: {field}");
+		Console.WriteLine($"context: {context}");
+	},
+};
+
+// v23
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	BadDataFound = args =>
+	{
+		Console.WriteLine($"field: {args.Field}");
+		Console.WriteLine($"context: {args.Context}");
+	},
+};
+
+

ConvertFromString

+
// v22
+Map(m => m.Property).Convert(row => row.GetField(0));
+
+// v23
+Map(m => m.Property).Convert(args => args.Row.GetField(0));
+
+

ConvertToString

+
// v22
+Map(m => m.Property).Convert(value => value.ToString());
+
+// v23
+Map(m => m.Property).Convert(args => args.Value.ToString());
+
+

GetConstructor

+
// v22
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	GetConstructor = classType => classType.GetConstructors().First(),
+};
+
+// v23
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	GetConstructor = args => args.ClassType.GetConstructors().First(),
+};
+
+

GetDynamicPropertyName

+
// v22
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	GetDynamicPropertyName = (fieldIndex, context) => $"Field{fieldIndex}";
+};
+
+// v23
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	GetDynamicPropertyName = args => $"Field{args.FieldIndex}",
+};
+
+

HeaderValidated

+
// v22
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	HeaderValidated = (invalidHeaders, context) => Console.WriteLine($"Invalid headers count: {invalidHeaders.Count}"),
+};
+
+// v23
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	HeaderValidated = args => Console.WriteLine($"Invalid headers count: {args.InvalidHeaders.Count}"),
+};
+
+

MissingFieldFound

+
// v22
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	MissingFieldFound = (headerNames, index, context) => Console.WriteLine($"Missing field: {headerNames[0]}"),
+};
+
+// v23
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	MissingFieldFound = args => Console.WriteLine($"Missing field: {args.HeaderNames[0]}"),
+};
+
+

PrepareHeaderForMatch

+
// v22
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	PrepareHeaderForMatch = (header, fieldIndex) => header.ToLower(),
+};
+
+// v23
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	PrepareHeaderForMatch = args => args.Header.ToLower(),
+};
+
+

ReadingExceptionOccurred

+
// v22
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+    ReadingExceptionOccurred = exception =>
+    {
+        Console.WriteLine(exception.Message);
+        throw args.Exception;
+    },
+};
+// v23
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+    ReadingExceptionOccurred = args =>
+    {
+        Console.WriteLine(args.Exception.Message);
+        throw args.Exception;
+    },
+};
+
+

ReferenceHeaderPrefix

+
// v22
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+    ReferenceHeaderPrefix = (memberType, memberName) => $"{memberName}.",
+};
+
+// v23
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+    ReferenceHeaderPrefix = args => $"{args.MemberName}.",
+};
+
+

ShouldQuote

+
// v22
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+    ShouldQuote = (field, fieldType, row) => true,
+};
+
+// v23
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+    ShouldQuote = args => true,
+};
+
+

ShouldSkipRecord

+
// v22
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+    ShouldSkipRecord = (records) => record.Length == 0,
+};
+
+// v23
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+    ShouldSkipRecord = args => args.Record.Length == 0,
+};
+
+

ShouldUseConstructorParameters

+
// v22
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	ShouldUseConstructorParameters = type => true;
+};
+
+// v23
+var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	ShouldUseConstructorParameters = args => true;
+};
+
+

Validate

+
// v22
+Map(m => m.Property).Validate(field => !string.IsNullOrEmpty(field));
+
+// v23
+Map(m => m.Property).Validate(args => !string.IsNullOrEmpty(args.Field));
+
+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v24/index.html b/docs/migration/v24/index.html new file mode 100644 index 000000000..5d47210e6 --- /dev/null +++ b/docs/migration/v24/index.html @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + V24 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Migrating from version 23 to 24

+

IWriterRow

+
// v23
+WriteConvertedField(field);
+
+// v24
+WriteConvertedField(field, fieldType);
+
+

CsvWriter

+
// v23
+WriteConvertedField(field);
+
+// v24
+WriteConvertedField(field, fieldType);
+
+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v25/index.html b/docs/migration/v25/index.html new file mode 100644 index 000000000..e7c32bfe5 --- /dev/null +++ b/docs/migration/v25/index.html @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + V25 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Migrating from version 24 to 25

+

Delegates

+

All delegate args had their non-parameterless constructor removed +in favor of using init.

+

BadDataFoundArgs

+
// v25
+var args = new BadDataRoundArgs(field, rawRecord, context);
+
+// v26
+var args = new BadDataFoundArgs
+{
+	Field = field,
+	RawRecord = rawRecord,
+	Context = context,
+};
+
+

ConvertFromStringArgs

+
// v25
+var args = new ConvertFromStringArgs(row);
+
+// v26
+var args = new ConvertFromStringArgs
+{
+	Row = row,
+};
+
+

ConvertToStringArgs

+
// v25
+var args = new ConvertToStringArgs(value);
+
+// v26
+var args = new ConvertToStringArgs
+{
+	Value = value,
+};
+
+

GetConstructorArgs

+
// v25
+var args = new GetConstructorArgs(type);
+
+// v26
+var args = new GetConstructorArgs
+{
+	ClassType = type,
+};
+
+

GetDynamicPropertyNameArgs

+
// v25
+var args = new GetDynamicPropertyNameArgs(index, context);
+
+// v26
+var args = new GetDynamicPropertyNameArgs
+{
+	FieldIndex = index,
+	Context = context,
+};
+
+

HeaderValidatedArgs

+
// v25
+var args = new HeaderValidatedArgs(headers, context);
+
+// v26
+var args = new HeaderValidatedArgs
+{
+	InvalidHeaders = headers,
+	Context = context,
+};
+
+

MissingFieldFoundArgs

+
// v25
+var args = new MissingFieldFoundArgs(headerNames, index, context);
+
+// v26
+var args = new MissingFieldFoundArgs
+{
+	HeaderNames = headerNames,
+	Index = index,
+	Context = context,
+};
+
+

PrepareHeaderForMatchArgs

+
// v25
+var args = new PrepareHeaderForMatchArgs(header, fieldIndex);
+
+// v26
+var args = new PrepareHeaderForMatchArgs
+{
+	Header = header,
+	FieldIndex = fieldIndex,
+};
+
+

ReadingExceptionOccurredArgs

+
// v25
+var args = new ReadingExceptionOccurredArgs(exception);
+
+// v26
+var args = new ReadingExceptionOccurredArgs
+{
+	Exception = exception,
+};
+
+

ReferenceHeaderPrefixArgs

+
// v25
+var args = new ReferenceHeaderPrefixArgs(memberType, memberName);
+
+// v26
+var args = new ReferenceHeaderPrefixArgs
+{
+	MemberType = memberType,
+	MemberName = memberName,
+};
+
+

ShouldQuoteArgs

+
// v25
+var args = new ShouldQuoteArgs(field, fieldType, row);
+
+// v26
+var args = new ShouldQuoteArgs
+{
+	Field = field,
+	FieldType = fieldType,
+	Row = row,
+};
+
+

ShouldSkipRecordArgs

+
// v25
+var args = new ShouldSkipRecordArgs(record);
+
+// v26
+var args = new ShouldSkipRecordArgs
+{
+	Record = record,
+};
+
+

ShouldUseConstructorParametersArgs

+
// v25
+var args = new ShouldUseConstructorParametersArgs(parameterType);
+
+// v26
+var args = new ShouldUseConstructorParametersArgs
+{
+	ParameterType = parameterType,
+};
+
+

ValidateArgs

+
// v25
+var args = new ValidateArgs(field);
+
+// v26
+var args = new ValidateArgs
+{
+	Field = field,
+};
+
+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v26/index.html b/docs/migration/v26/index.html new file mode 100644 index 000000000..a7b641f23 --- /dev/null +++ b/docs/migration/v26/index.html @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + V26 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Migrating from version 25 to 26

+

Delegates

+

All delegates args objects have their init accessor removed. +Constructor parameters are used instead.

+

BadDataFoundArgs

+
// v26
+var args = new BadDataFoundArgs
+{
+	Field = field,
+	RawRecord = rawRecord,
+	Context = context,
+};
+
+// v27
+var args = new BadDataRoundArgs(field, rawRecord, context);
+
+

ConvertFromStringArgs

+
// v26
+var args = new ConvertFromStringArgs
+{
+	Row = row,
+};
+
+// v27
+var args = new ConvertFromStringArgs(row);
+
+

ConvertToStringArgs

+
// v26
+var args = new ConvertToStringArgs
+{
+	Value = value,
+};
+
+// v27
+var args = new ConvertToStringArgs(value);
+
+

GetConstructorArgs

+
// v26
+var args = new GetConstructorArgs
+{
+	ClassType = type,
+};
+
+// v27
+var args = new GetConstructorArgs(type);
+
+

GetDynamicPropertyNameArgs

+
// v26
+var args = new GetDynamicPropertyNameArgs
+{
+	FieldIndex = index,
+	Context = context,
+};
+
+// v27
+var args = new GetDynamicPropertyNameArgs(index, context);
+
+

HeaderValidatedArgs

+
// v26
+var args = new HeaderValidatedArgs
+{
+	InvalidHeaders = headers,
+	Context = context,
+};
+
+// v27
+var args = new HeaderValidatedArgs(headers, context);
+
+

MissingFieldFoundArgs

+
// v26
+var args = new MissingFieldFoundArgs
+{
+	HeaderNames = headerNames,
+	Index = index,
+	Context = context,
+};
+
+// v27
+var args = new MissingFieldFoundArgs(headerNames, index, context);
+
+

PrepareHeaderForMatchArgs

+
// v26
+var args = new PrepareHeaderForMatchArgs
+{
+	Header = header,
+	FieldIndex = fieldIndex,
+};
+
+// v27
+var args = new PrepareHeaderForMatchArgs(header, fieldIndex);
+
+

ReadingExceptionOccurredArgs

+
// v26
+var args = new ReadingExceptionOccurredArgs
+{
+	Exception = exception,
+};
+
+// v27
+var args = new ReadingExceptionOccurredArgs(exception);
+
+

ReferenceHeaderPrefixArgs

+
// v26
+var args = new ReferenceHeaderPrefixArgs
+{
+	MemberType = memberType,
+	MemberName = memberName,
+};
+
+// v27
+var args = new ReferenceHeaderPrefixArgs(memberType, memberName);
+
+

ShouldQuoteArgs

+
// v26
+var args = new ShouldQuoteArgs
+{
+	Field = field,
+	FieldType = fieldType,
+	Row = row,
+};
+
+// v27
+var args = new ShouldQuoteArgs(field, fieldType, row);
+
+

ShouldSkipRecordArgs

+
// v26
+var args = new ShouldSkipRecordArgs
+{
+	Record = record,
+};
+
+// v27
+var args = new ShouldSkipRecordArgs(record);
+
+

ShouldUseConstructorParametersArgs

+
// v26
+var args = new ShouldUseConstructorParametersArgs
+{
+	ParameterType = parameterType,
+};
+
+// v27
+var args = new ShouldUseConstructorParametersArgs(parameterType);
+
+

ValidateArgs

+
// v26
+var args = new ValidateArgs
+{
+	Field = field,
+};
+
+// v27
+var args = new ValidateArgs(field);
+
+

IParserConfiguration

+
    +
  • Added property bool ExceptionMessagesContainRawData { get; }.
  • +
+

Any class that implements IParserConfiguration will need these changes +applied to it.

+

IWriterConfiguration

+
    +
  • Added property bool ExceptionMessagesContainRawData { get; }.
  • +
+

Any class that implements IParserConfiguration will need these changes +applied to it.

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v27/index.html b/docs/migration/v27/index.html new file mode 100644 index 000000000..569049f79 --- /dev/null +++ b/docs/migration/v27/index.html @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + V27 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Migrating from version 26 to 27

+

CsvConfiugration.WhiteSpaceCharacters

+
    +
  • Removed \t from the array of default characters.
  • +
+

If you are expecting \t to be trimmed, you will need to add this to the +whitespace characters.

+
var config = new CsvConfiguration(CultureInfo.InvariantCulture)
+{
+	WhiteSpaceCharacters = new[] { ' ', '\t' },
+};
+
+

IParserConfiguration

+
    +
  • Added property bool DetectDelimiter { get; }.
  • +
  • Added property string[] DetectDelimiterValues { get; }.
  • +
+

Any class that implements IParserConfiguration will need these changes +applied to it.

+

IWriter

+
    +
  • Added method Task WriteRecordsAsync<T>(IAsyncEnumerable<T> records, CancellationToken cancellationToken = default). +This does not apply to projects that reference the net45 version of CsvHelper.
  • +
+

Any class that implements IWriter will need these changes applied to it.

+

IParser

+
    +
  • Added property string Delimiter { get; }.
  • +
+

Any class that implements IParser will need these changes applied to it.

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v3/index.html b/docs/migration/v3/index.html new file mode 100644 index 000000000..2d6a1b251 --- /dev/null +++ b/docs/migration/v3/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V3 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v4/index.html b/docs/migration/v4/index.html new file mode 100644 index 000000000..a777b22da --- /dev/null +++ b/docs/migration/v4/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V4 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v5/index.html b/docs/migration/v5/index.html new file mode 100644 index 000000000..4dff28af8 --- /dev/null +++ b/docs/migration/v5/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V5 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v6/index.html b/docs/migration/v6/index.html new file mode 100644 index 000000000..33cbb5a8c --- /dev/null +++ b/docs/migration/v6/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V6 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v7/index.html b/docs/migration/v7/index.html new file mode 100644 index 000000000..035b593a8 --- /dev/null +++ b/docs/migration/v7/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V7 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v8/index.html b/docs/migration/v8/index.html new file mode 100644 index 000000000..739ffecbd --- /dev/null +++ b/docs/migration/v8/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V8 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + + diff --git a/docs/migration/v9/index.html b/docs/migration/v9/index.html new file mode 100644 index 000000000..c20f250e2 --- /dev/null +++ b/docs/migration/v9/index.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + V9 | CsvHelper + + + + + + + + + + + + + + + + +
+
+
+
+

Coming Soon

+ +
+
+
+
+ +

+ + + + + + + + + + +