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

Ambiguity between overloads with an IDictionary or an IDictionary<string, object> parameter

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.2
    • Affects Version/s: 1.1
    • Component/s: None
    • None
    • Fully Compatible

      When we introduced new overloads of BsonDocument constructors and methods with a non-generic IDictionary parameter (which we did to be Powershell friendly) we created an ambiguity with other overloads with a generic IDictionary<string, object> parameter. Here's one example that won't compile anymore:

      var dictionary = new Dictionary<string, object> {

      { "x", 1 }

      };
      var document = new BsonDocument(dictionary);

      There are others that need to be found and fixed as well.

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

              Created:
              Updated:
              Resolved: