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

Consider allowing to implement the GridFSUploadStream[<>] and GridFSDownloadStream[<>]

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.15.0
    • Affects Version/s: 2.3
    • Component/s: API, GridFS
    • None
    • Fully Compatible

      Currently, the IGridFSBucket[<>] interfaces expose methods that return instances of the GridFSUploadStream[<>] and GridFSDownloadStream[<>] abstract classes. Unfortunately, their constructors are internal, so decoration of IGridFSBucket[<>] that requires decoration of returned streams is impossible, because one cannot inherit from a class with an internal constructor. This is disappointing, especially given that other interfaces (collection, database, client, etc.) are very much decoratable and look carefully desigined. While I understand that there might be compelling reasons for this, that are unknown to me, I ask you to consider removing the internal constructor to allow inheritance and, hence, decoration of the GridFS-related interfaces, especially since this does not look like a breaking change.

            Assignee:
            james.kovacs@mongodb.com James Kovacs
            Reporter:
            onyxmaster Aristarkh Zagorodnikov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: