Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2889

BsonClassMap.LookupClassMap supports private constructors inconsistently

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.10.2
    • Affects Version/s: 2.10.0
    • Component/s: Serialization
    • None
    • Minor Change

      For a derived type with private parameterless constructor, BsonClassMap.LookupClassMap works fine if it introduces new properties, but throws an exception if it does not (example in the attachment). It seems to me the method should work fine in both cases.

        1. Program.cs
          2 kB
          Gennady Andreev

            Assignee:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Reporter:
            andrgenn@gmail.com Gennady Andreev
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: