Skip to content

Conversation

@fuguiKz
Copy link

@fuguiKz fuguiKz commented Dec 18, 2025

Fixes #2338

  • Adds ObjectDisposedException XML docs to CsvReader.GetRecords<T>(T anonymousTypeDefinition) and CsvReader.GetRecords(Type type).
  • Adds a regression test for the anonymous type overload to ensure it throws on deferred enumeration after disposal.

Tests:

  • dotnet test tests/CsvHelper.Tests/CsvHelper.Tests.csproj -c Release -f net9.0 --filter FullyQualifiedName~CsvHelper.Tests.Reading.YieldTests

@fuguiKz
Copy link
Author

fuguiKz commented Dec 19, 2025

Quick ping (no rush): this is doc-only + a small regression test for the deferred-enumeration-after-disposal case (Fixes #2338). No behavior change intended — just documenting the existing ObjectDisposedException contract and locking it in with a test. Happy to tweak wording/placement if you prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document exceptions for CsvReader.GetRecords

1 participant