Make Feature class internal

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Minor - P4
    • 4.0.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Dotnet Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      The Feature class (and its subclass HintForFindAndModifyFeature) in MongoDB.Driver.Core.Misc is currently public but serves no external use case. It is internal driver infrastructure for gating commands based on server wire version.

      What to do

      • Make Feature internal.
      • Add InternalsVisibleTo for MongoDB.Driver.Encryption to cover cross-assembly usage (e.g. ClientEncryption calling Feature.Csfle2QEv2.ThrowIfNotSupported).

      Why it is safe in v4.0

      • The public constructor, public instance methods (ThrowIfNotSupported(IMongoClient), ThrowIfNotSupportedAsync), and public static feature constants are technically public API today, but have no meaningful external use case.
      • MongoDB.Driver.TestHelpers (which exposes RequireServer.Supports(Feature)) is not a shipped NuGet package, so its API is not a public contract.
      • This is a breaking change and should target a major version.

            Assignee:
            Unassigned
            Reporter:
            Adelin Mbida Owona
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: