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

Add support for serializing type Tuple introduced in .NET Framework 4

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.0
    • 1.8
    • None
    • None
    • Windows 7 64-bit

    Description

      I have a c# Fund class with a property of type Dictionary<Tuple<int,DateTime>, int> called Quartiles. I added a number of Fund objects to a collection in mongodb called "funds". They were added without any errors. I then attempted to read back the fund documents from the collection. I got an error trying to access the first document in the collection. The error message said there was a problem serializing the Quartiles property and that an item with the same key had already been added. I then attempted to inspect a sample Fund document using the mongo shell and it looks like it wasn't created properly.

      All relevant information is attached.

      Attachments

        1. c-sharp driver bug.txt
          12 kB
        2. TupleSerializer.cs
          1 kB

        Activity

          People

            robert@mongodb.com Robert Stam
            mryhmln Mary Hamlin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: