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

Consider redesign MongoDefaults

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Currently MongoDefaults is available only on the Driver level which makes unavailable to get these values on the Core level. The Core analog for this class is MongoInternalDefaults. The Bson level has his own class as well.

      Also, the above classes are public(except of MongoInternalDefaults) and mutable which has no a lot of sense since the default values are not supposed to be changed. We should define how we should handle this behavior.

      Options that we discussed:

      1. Remove `MongoInternalDefaults` and move MongoDefaults on the Core level which will make it available everywhere on Core and higher levels
        1. In this approach, we can consider formatting like grouping all consts by purpose to the nested classes like: Defaults.SDAM.XXXDefaults.CMAP.XXX
      2. Remove all these classes and instead place these values as consts into appropriated setting classes. For example: connection pool related properties can be put into ConnectionPoolSettings

      Regardless the taken solution, the new approach should be internal and not be exposed for users. Additionally it makes sense to mark current classes with default settings as obsolete

            Assignee:
            Unassigned Unassigned
            Reporter:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: