diff options
Diffstat (limited to 'ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v28/index.md')
-rw-r--r-- | ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v28/index.md | 38 |
1 files changed, 38 insertions, 0 deletions
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. |