-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.5
-
Component/s: BSON
-
None
-
Environment:.NET Core 2.0
The source code (BsonClassMapSerializer.cs) appears to have the following statement around .BeginInit and .EngInit calls:
#if NET45
...
#endif
The #if statement was added to avoid dependency on unsupported API where it's not available, but in my case, where NETCOREAPP2_0 is defined instead of NET45, casting document to ISupportInitialize then calling InitBeginand InitEnd seems to work perfectly fine.
Can we change the #if condition to something that captures more version that support the feature, or is there another reason to keep it? (If so - would be nice to document it)
This created a lot of confusion for me since the docs don't specify version requirement for this feature to work, so I couldn't figure out why EndInit wasn't being called.
- depends on
-
CSHARP-2174 Use a single solution and set of project files to multi target .NET Framework and .NET Standard
- Closed
-
CSHARP-2400 Build Nuget packages from .csproj files instead of from .nuspec files
- Closed
- duplicates
-
CSHARP-2138 Support ISupportInitialize when targeting .NET standard 1.5
- Closed