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

RegisterSerializer should check that the serializer's ValueType matches the type it is being registered for

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • 2.5
    • Serialization
    • None

    Description

      The following should result in an exception thrown when RegisterSerializer is called:

      var intSerializer = new Int32Serializer();
      BsonSerializer.RegisterSerializer(typeof(long), intSerializer);
      

      because the types don't agree.

      Attachments

        Activity

          People

            Unassigned Unassigned
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: