diff options
Diffstat (limited to 'ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration')
30 files changed, 1233 insertions, 0 deletions
diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/index.md new file mode 100644 index 0000000..e52193e --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/index.md @@ -0,0 +1,33 @@ +# Migration + +Migration steps for major version bumps. + +- [29 to 30](~/migration/v30) +- [28 to 29](~/migration/v29) +- [27 to 28](~/migration/v28) +- [26 to 27](~/migration/v27) +- [25 to 26](~/migration/v26) +- [24 to 25](~/migration/v25) +- [23 to 24](~/migration/v24) +- [22 to 23](~/migration/v23) +- [21 to 22](~/migration/v22) +- [20 to 21](~/migration/v21) +- [19 to 20](~/migration/v20) +- [18 to 19](~/migration/v19) +- [17 to 18](~/migration/v18) +- [16 to 17](~/migration/v17) +- [15 to 16](~/migration/v16) +- [14 to 15](~/migration/v15) +- [13 to 14](~/migration/v14) +- [12 to 13](~/migration/v13) +- [11 to 12](~/migration/v12) +- [10 to 11](~/migration/v11) +- [9 to 10](~/migration/v10) +- [8 to 9](~/migration/v9) +- [7 to 8](~/migration/v8) +- [6 to 7](~/migration/v7) +- [5 to 6](~/migration/v6) +- [4 to 5](~/migration/v5) +- [3 to 4](~/migration/v4) +- [2 to 3](~/migration/v3) +- [1 to 2](~/migration/v2) diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v10/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v10/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v10/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v11/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v11/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v11/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v12/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v12/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v12/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v13/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v13/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v13/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v14/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v14/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v14/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v15/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v15/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v15/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v16/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v16/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v16/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v17/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v17/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v17/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v18/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v18/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v18/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v19/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v19/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v19/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v2/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v2/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v2/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v20/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v20/index.md new file mode 100644 index 0000000..9ca4b1d --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v20/index.md @@ -0,0 +1,322 @@ +# Migrating from version 19 to 20 + +## ConvertUsing + +`ConvertUsing` was renamed to `Convert`. + +```cs +// 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;`. + +```cs +// 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`. + +```cs +// v19 +class MyConfig : CsvConfiguration {} + +// v20 +record MyConfig : CsvConfiguration {} +``` + +### ShouldQuote + +`ShouldQuote` now takes in `IWriterRow` instead of `CsvContext`. + +```cs +// 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?`. + +```cs +// 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`. + +```cs +// v19 +csv.Configuration.RegisterClassMap<MyMap>(); + +// v20 +csv.Context.RegisterClassMap<MyMap>(); +``` + +### UnregisterClassMap + +This moved to `CsvContext`. + +```cs +// v19 +csv.Configuration.UnregisterClassMap<MyMap>(); + +// v20 +csv.Context.UnregisterClassMap<MyMap>(); +``` + +### AutoMap + +This moved to `CsvContext`. + +```cs +// v19 +csv.Configuration.AutoMap<MyType>(); + +// v20 +csv.Context.AutoMap<MyType>(); +``` + +## IParserConfiguration + +All setters removed. + +```cs +// 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. + +```cs +// 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`. + +```cs +// v19 +class MyConfig : ISerializerConfiguration {} + +// v20 +class MyConfig : IWriterConfiguration {} +``` + +## IWriterConfiguration + +All setters removed. + +```cs +// 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`. + +```cs +// 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()`. + +```cs +// 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. + +```cs +// 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/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v21/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v21/index.md new file mode 100644 index 0000000..6fbc307 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v21/index.md @@ -0,0 +1,19 @@ +# Migrating from version 20 to 21 + +## CsvConfiguration + +Property `char? NewLine` changed to `string NewLine`. + +```cs +// v20 +var config = new CsvConfiguration(CultureInfo.InvariantCulture) +{ + NewLine = '\r', +}; + +// v21 +var config = new CsvConfiguration(CultureInfo.InvariantCulture) +{ + NewLine = "\r", +}; +``` diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v22/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v22/index.md new file mode 100644 index 0000000..ea7972f --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v22/index.md @@ -0,0 +1,51 @@ +# Migrating from version 21 to 22 + +## ParserMode + +Name change to `CsvMode`. + +```cs +// v21 +ParserMode.RFC4180 + +//v22 +CsvMode.RFC4180 +``` + +## ShouldQuote + +```cs +// 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. + +```cs +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/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v23/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v23/index.md new file mode 100644 index 0000000..e2fed33 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v23/index.md @@ -0,0 +1,228 @@ +# 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. + +```cs +// 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** +```cs +// 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** +```cs +// v22 +Map(m => m.Property).Convert(row => row.GetField(0)); + +// v23 +Map(m => m.Property).Convert(args => args.Row.GetField(0)); +``` + +**ConvertToString** +```cs +// v22 +Map(m => m.Property).Convert(value => value.ToString()); + +// v23 +Map(m => m.Property).Convert(args => args.Value.ToString()); +``` + +**GetConstructor** +```cs +// 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** +```cs +// 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** +```cs +// 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** +```cs +// 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** +```cs +// 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** +```cs +// 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** +```cs +// v22 +var config = new CsvConfiguration(CultureInfo.InvariantCulture) +{ + ReferenceHeaderPrefix = (memberType, memberName) => $"{memberName}.", +}; + +// v23 +var config = new CsvConfiguration(CultureInfo.InvariantCulture) +{ + ReferenceHeaderPrefix = args => $"{args.MemberName}.", +}; +``` + +**ShouldQuote** +```cs +// v22 +var config = new CsvConfiguration(CultureInfo.InvariantCulture) +{ + ShouldQuote = (field, fieldType, row) => true, +}; + +// v23 +var config = new CsvConfiguration(CultureInfo.InvariantCulture) +{ + ShouldQuote = args => true, +}; +``` + +**ShouldSkipRecord** +```cs +// 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** +```cs +// v22 +var config = new CsvConfiguration(CultureInfo.InvariantCulture) +{ + ShouldUseConstructorParameters = type => true; +}; + +// v23 +var config = new CsvConfiguration(CultureInfo.InvariantCulture) +{ + ShouldUseConstructorParameters = args => true; +}; +``` + +**Validate** +```cs +// v22 +Map(m => m.Property).Validate(field => !string.IsNullOrEmpty(field)); + +// v23 +Map(m => m.Property).Validate(args => !string.IsNullOrEmpty(args.Field)); +``` diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v24/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v24/index.md new file mode 100644 index 0000000..65f2d9d --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v24/index.md @@ -0,0 +1,21 @@ +# Migrating from version 23 to 24 + +## IWriterRow + +```cs +// v23 +WriteConvertedField(field); + +// v24 +WriteConvertedField(field, fieldType); +``` + +## CsvWriter + +```cs +// v23 +WriteConvertedField(field); + +// v24 +WriteConvertedField(field, fieldType); +``` diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v25/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v25/index.md new file mode 100644 index 0000000..62ee34c --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v25/index.md @@ -0,0 +1,187 @@ +# Migrating from version 24 to 25 + +## Delegates + +All delegate args had their non-parameterless constructor removed +in favor of using `init`. + +**BadDataFoundArgs** + +```cs +// v25 +var args = new BadDataRoundArgs(field, rawRecord, context); + +// v26 +var args = new BadDataFoundArgs +{ + Field = field, + RawRecord = rawRecord, + Context = context, +}; +``` + +**ConvertFromStringArgs** + +```cs +// v25 +var args = new ConvertFromStringArgs(row); + +// v26 +var args = new ConvertFromStringArgs +{ + Row = row, +}; +``` + +**ConvertToStringArgs** +```cs +// v25 +var args = new ConvertToStringArgs(value); + +// v26 +var args = new ConvertToStringArgs +{ + Value = value, +}; +``` + +**GetConstructorArgs** +```cs +// v25 +var args = new GetConstructorArgs(type); + +// v26 +var args = new GetConstructorArgs +{ + ClassType = type, +}; +``` + +**GetDynamicPropertyNameArgs** +```cs +// v25 +var args = new GetDynamicPropertyNameArgs(index, context); + +// v26 +var args = new GetDynamicPropertyNameArgs +{ + FieldIndex = index, + Context = context, +}; +``` + +**HeaderValidatedArgs** +```cs +// v25 +var args = new HeaderValidatedArgs(headers, context); + +// v26 +var args = new HeaderValidatedArgs +{ + InvalidHeaders = headers, + Context = context, +}; +``` + +**MissingFieldFoundArgs** +```cs +// v25 +var args = new MissingFieldFoundArgs(headerNames, index, context); + +// v26 +var args = new MissingFieldFoundArgs +{ + HeaderNames = headerNames, + Index = index, + Context = context, +}; +``` + +**PrepareHeaderForMatchArgs** +```cs +// v25 +var args = new PrepareHeaderForMatchArgs(header, fieldIndex); + +// v26 +var args = new PrepareHeaderForMatchArgs +{ + Header = header, + FieldIndex = fieldIndex, +}; +``` + +**ReadingExceptionOccurredArgs** +```cs +// v25 +var args = new ReadingExceptionOccurredArgs(exception); + +// v26 +var args = new ReadingExceptionOccurredArgs +{ + Exception = exception, +}; +``` + +**ReferenceHeaderPrefixArgs** +```cs +// v25 +var args = new ReferenceHeaderPrefixArgs(memberType, memberName); + +// v26 +var args = new ReferenceHeaderPrefixArgs +{ + MemberType = memberType, + MemberName = memberName, +}; +``` + +**ShouldQuoteArgs** +```cs +// v25 +var args = new ShouldQuoteArgs(field, fieldType, row); + +// v26 +var args = new ShouldQuoteArgs +{ + Field = field, + FieldType = fieldType, + Row = row, +}; +``` + +**ShouldSkipRecordArgs** +```cs +// v25 +var args = new ShouldSkipRecordArgs(record); + +// v26 +var args = new ShouldSkipRecordArgs +{ + Record = record, +}; +``` + +**ShouldUseConstructorParametersArgs** +```cs +// v25 +var args = new ShouldUseConstructorParametersArgs(parameterType); + +// v26 +var args = new ShouldUseConstructorParametersArgs +{ + ParameterType = parameterType, +}; +``` + +**ValidateArgs** +```cs +// v25 +var args = new ValidateArgs(field); + +// v26 +var args = new ValidateArgs +{ + Field = field, +}; +``` + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v26/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v26/index.md new file mode 100644 index 0000000..694fefc --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v26/index.md @@ -0,0 +1,202 @@ +# Migrating from version 25 to 26 + +## Delegates + +All delegates args objects have their `init` accessor removed. +Constructor parameters are used instead. + +**BadDataFoundArgs** + +```cs +// v26 +var args = new BadDataFoundArgs +{ + Field = field, + RawRecord = rawRecord, + Context = context, +}; + +// v27 +var args = new BadDataRoundArgs(field, rawRecord, context); +``` + +**ConvertFromStringArgs** + +```cs +// v26 +var args = new ConvertFromStringArgs +{ + Row = row, +}; + +// v27 +var args = new ConvertFromStringArgs(row); +``` + +**ConvertToStringArgs** +```cs +// v26 +var args = new ConvertToStringArgs +{ + Value = value, +}; + +// v27 +var args = new ConvertToStringArgs(value); +``` + +**GetConstructorArgs** +```cs +// v26 +var args = new GetConstructorArgs +{ + ClassType = type, +}; + +// v27 +var args = new GetConstructorArgs(type); +``` + +**GetDynamicPropertyNameArgs** +```cs +// v26 +var args = new GetDynamicPropertyNameArgs +{ + FieldIndex = index, + Context = context, +}; + +// v27 +var args = new GetDynamicPropertyNameArgs(index, context); +``` + +**HeaderValidatedArgs** +```cs +// v26 +var args = new HeaderValidatedArgs +{ + InvalidHeaders = headers, + Context = context, +}; + +// v27 +var args = new HeaderValidatedArgs(headers, context); +``` + +**MissingFieldFoundArgs** +```cs +// v26 +var args = new MissingFieldFoundArgs +{ + HeaderNames = headerNames, + Index = index, + Context = context, +}; + +// v27 +var args = new MissingFieldFoundArgs(headerNames, index, context); +``` + +**PrepareHeaderForMatchArgs** +```cs +// v26 +var args = new PrepareHeaderForMatchArgs +{ + Header = header, + FieldIndex = fieldIndex, +}; + +// v27 +var args = new PrepareHeaderForMatchArgs(header, fieldIndex); +``` + +**ReadingExceptionOccurredArgs** +```cs +// v26 +var args = new ReadingExceptionOccurredArgs +{ + Exception = exception, +}; + +// v27 +var args = new ReadingExceptionOccurredArgs(exception); +``` + +**ReferenceHeaderPrefixArgs** +```cs +// v26 +var args = new ReferenceHeaderPrefixArgs +{ + MemberType = memberType, + MemberName = memberName, +}; + +// v27 +var args = new ReferenceHeaderPrefixArgs(memberType, memberName); +``` + +**ShouldQuoteArgs** +```cs +// v26 +var args = new ShouldQuoteArgs +{ + Field = field, + FieldType = fieldType, + Row = row, +}; + +// v27 +var args = new ShouldQuoteArgs(field, fieldType, row); +``` + +**ShouldSkipRecordArgs** +```cs +// v26 +var args = new ShouldSkipRecordArgs +{ + Record = record, +}; + +// v27 +var args = new ShouldSkipRecordArgs(record); +``` + +**ShouldUseConstructorParametersArgs** +```cs +// v26 +var args = new ShouldUseConstructorParametersArgs +{ + ParameterType = parameterType, +}; + +// v27 +var args = new ShouldUseConstructorParametersArgs(parameterType); +``` + +**ValidateArgs** +```cs +// 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/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v27/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v27/index.md new file mode 100644 index 0000000..02db92b --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v27/index.md @@ -0,0 +1,36 @@ +# Migrating from version 26 to 27 + +## CsvConfiguration.WhiteSpaceChars + +- 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. + +```cs +var config = new CsvConfiguration(CultureInfo.InvariantCulture) +{ + WhiteSpaceChars = 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/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v28/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v28/index.md new file mode 100644 index 0000000..743dd9c --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v28/index.md @@ -0,0 +1,38 @@ +# Migrating from version 27 to 28 + +## ShouldSkipRecordArgs + +- `string[] ShouldSkipRecordArgs.Record` changed to `IReaderRow ShouldSkipRecordArgs.Row`. + +```cs +// 27 +var config = new CsvConfiguration(CultureInfo.InvariantCulture) +{ + ShouldSkipRecord = args => args.Record.Length < 10; +}; + +// 28 + +var config = new CsvConfiguration(CultureInfo.InvariantCulture) +{ + ShouldSkipRecord = args => args.Row.Parser.Record.Length < 10; +}; +``` + +## ConfigurationFunctions.ShouldSkipRecord + +- Removed `ConfigurationFunctions.ShouldSkipRecord`. + +`null` can be used in place of this now, and is the default. + +```cs +var config = new CsvConfiguration(CultureInfo.InvariantCulture) +{ + ShouldSkipRecord = null +}; +``` + + +## IParserConfiguration.Validate + +Implement the `Validate` method. diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v29/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v29/index.md new file mode 100644 index 0000000..c9406b4 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v29/index.md @@ -0,0 +1,29 @@ +# Migrating from version 28 to 29 + +## CsvConfiguration.SanitizeForInjection + +`bool CsvConfiguration.SanitizeInjection` changed to `InjectionOptions CsvConfiguration.InjectionOptions`. + +```cs +// 28 +var config = new CsvConfiguration(CultureInfo.InvariantCulture) +{ + SanitizeForInjection = true, +} + +// 29 +var config = new CsvConfiguration(CultureInfo.InvariantCulture) +{ + InjectionOptions = InjectionOptions.Escape, +} +``` + +## IWriterConfiguration.SanitizeForInjection + +`bool IWriterConfiguration.SanitizeInjection` changed to `InjectionOptions IWriterConfiguration.InjectionOptions`. +Any class that implements `IWriterConfiguration` will need this changed. + +## IParserConfiguration.GetDelimiter + +`GetDelimiter IParserConfiguration.GetDelimiter` was added. +Any class that implements `IParserConfiguration` will need to add this. diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v3/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v3/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v3/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v30/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v30/index.md new file mode 100644 index 0000000..2c324f5 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v30/index.md @@ -0,0 +1,31 @@ +# Migrating from version 29 to 30 + +## BadDataException constructor + +```cs +// 29 +throw new BadDataException(context); + +// 30 +throw new BadDataException(field, rawRecord, context); +``` + +## IParserConfiguration + +Any class that implements `IParserConfiguration` will need to add property `double MaxFixFieldSize { get; }`. +Any class that implements `IParserConfiguration` will need to add property `bool LeaveOpen { get; }`. + +## IWriterConfiguration + +ixFieldSize { get; }`. +Any class that implements `IWriterConfiguration` will need to add property `bool LeaveO + +## ValidateArgs + +```cs +// 29 +var args = new ValidateArgs(field); + +// 30 +var args = new ValidateArgs(field, row); +``` diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v4/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v4/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v4/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v5/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v5/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v5/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v6/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v6/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v6/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v7/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v7/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v7/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v8/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v8/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v8/index.md @@ -0,0 +1,2 @@ +# Coming Soon + diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v9/index.md b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v9/index.md new file mode 100644 index 0000000..5060312 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v9/index.md @@ -0,0 +1,2 @@ +# Coming Soon + |