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

Add Support For GUID in ToString representation of a cursor

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Currently, when calling ToString() on a cursor, if it includes a Guid, the resulting output looks something like:

      CSUUID("f7402520-3018-4b8e-9414-4d93a244f9b0")
      

      We should add a shell friendly version of this output. At its most basic it is as simple as converting to a byte array then to a base64 encoded string.

      var str = $"new BinData(3, \"{Convert.ToBase64String(guid.ToByteArray())}\")";
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            peter.garafano@mongodb.com Peter Garafano (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: