runtime: DbDataReader.Close() doesn't unify with System.Data.Common
If I write a provider against System.Data.Common on .NET Standard 1.2 and implement Dispose
appropriately, then I try to use that provider on .NET Framework 4.6 or .NET Core 2.0, the following code won’t work.
reader.Close(); // No-op
Assert.True(reader.IsClosed); // Fails since Dispose is never called
It fails because on .NET Framework and .NET Core 2.0, Dispose
calls Close
(not the other way around) and since there is no virtual Close
method on .NET Standard 1.2, I cannot override it without cross-targeting the frameworks that do have it.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 28 (27 by maintainers)
According to @weshaggard we would have to make changes in 1.1.0