diff options
author | chai <215380520@qq.com> | 2023-05-12 09:24:40 +0800 |
---|---|---|
committer | chai <215380520@qq.com> | 2023-05-12 09:24:40 +0800 |
commit | 2a1cd4fda8a4a8e649910d16b4dfa1ce7ae63543 (patch) | |
tree | a471fafed72e80b4ac3ac3002e06c34220dd6058 /ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v22/index.md | |
parent | b8a694746562b37dc8dc5b8b5aec8612bb0964fc (diff) |
*misc
Diffstat (limited to 'ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v22/index.md')
-rw-r--r-- | ThirdParty/CsvHelper-master/src/CsvHelper.Website/input/migration/v22/index.md | 51 |
1 files changed, 51 insertions, 0 deletions
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. |