ImmutableTypeClassMapConvention is ignoring some constructors

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 2.12.0
    • Affects Version/s: 2.11.3
    • Component/s: Serialization
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      ImmutableTypeClassMapConvention is ignoring any constructor that doesn't have exactly as many parameters as the class has properties.

      This is not correct. All constructors should be considered.

      The problem is this line of code:

      https://github.com/mongodb/mongo-csharp-driver/blob/v2.11.3/src/MongoDB.Bson/Serialization/Conventions/ImmutableTypeClassMapConvention.cs#L55

      The if statement and the continue statement should just be removed.

            Assignee:
            Robert Stam
            Reporter:
            Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: