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

BsonSerializationInfoFinder VisitMethodCall

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 1.9.2
    • BSON, Linq, Serialization
    • None
    • N/A
    • Fully Compatible

    Description

      BsonSerializationInfoFinder VisitMethodCall doesn't address the method GetValue case.

      I'm currently developing dynamic linq, where I leverage the GetValue to build a method then create an expression with it. Suggested update to the VisitMethodCall,

      protected override BsonSerializationInfo VisitMethodCall(MethodCallExpression node)
      {
      switch (node.Method.Name)

      { case "ElementAt": return VisitElementAt(node); case "GetValue": case "get_Item": return VisitGetItem(node); }

      return null;
      }

      It works like a champ now.

      Thanks,
      Dama

      Attachments

        Activity

          People

            Unassigned Unassigned
            dama.che.71 Dama Reffett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: