LoginSignup
1
1

More than 3 years have passed since last update.

CSVHelper ver 25.0 -> 26.1 チェンジログ

Last updated at Posted at 2021-03-05

CSVHelper の情報共有です。

CSVHelper 26.1 が出ました。26.0 が主なリリース版で、26.1 で軽微な修正が行われています。
修正点は次の通りです。

  • config クラスで ExceptionMessagesContainRawData がデフォルトで true になりました。
  • 全てのクラスで init プロパティが削除されました。
  • ヘッダレコードに含まれる例外メッセージが改善されました。

また、前バージョンとの互換性に影響がでる変更があります。

  1. IParserConfiguration に bool ExceptionMessagesContainRawData { get; } が追加されました。
  2. IWriterConfiguration に bool ExceptionMessagesContainRawData { get; } が追加されました。
  3. 全てのデリゲートオブジェクトから init メソッドが削除され、パラメータを指定できるコンストラクタが追加されました。対象は次の通りです。
    1. BadDataFound
    2. ConvertFromString
    3. GetConstructor
    4. GetDynamicPropertyName
    5. HeaderValidated
    6. MissingFieldFound
    7. PrepareHeaderForMatch
    8. ReadingExceptionOccurred
    9. ReferenceHeaderPrefix
    10. ShouldQuote
    11. ShouldSkipRecord
    12. ShouldUseConstructorParameter
    13. Validate

コンストラクタでパラメータ指定してインスタンス化出来る方が、コードが直感的になっていいと思います。
開発者の方々に感謝です。

なお、オリジナルはこちらから参照できます。
https://joshclose.github.io/CsvHelper/change-log/

26.0.1
Bug Fixes

  • Fixed issue with constant not working when the field is missing.

26.0.0

Features

  • Added configuration for ExceptionMessagesContainRawData that defaults to true.

Bug Fixes

  • Removed all init properties. These were causing people too many problems.
  • Fixed issue with exception message not containing the header record.

Breaking Changes

  • Added bool IParserConfiguration.ExceptionMessagesContainRawData { get; }.
  • Added bool IWriterConfiguration.ExceptionMessagesContainRawData { get; }.
  • All delegate args objects have init removed and now have constructors with parameters.
    • BadDataFound
    • ConvertFromString
    • GetConstructor
    • GetDynamicPropertyName
    • HeaderValidated
    • MissingFieldFound
    • PrepareHeaderForMatch
    • ReadingExceptionOccurred
    • ReferenceHeaderPrefix
    • ShouldQuote
    • ShouldSkipRecord
    • ShouldUseConstructorParameter
    • Validate
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1