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.
- is duplicated by
-
CSHARP-1878 Make GridFSDownloadStream and GridFSUploadStream mockable
- Closed