Consolidate driver project Type extension methods in Misc\TypeExtensions.cs

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: LINQ
    • None
    • Dotnet Drivers
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      While working on a LINQ ticket I discovered that we have extension methods for Type scattered across three files:

      Serialization\TypeExtensions.cs
      Misc\TypeExtensions.cs
      ReflectionExtensions.cs

      The first file is in the Bson project, and the other two are in the Driver project. Since these classes are internal nothing can be done to consolidate the Bson and Driver extension methods. Fortunately the Bson project only has 3 Type extension methods.

      The two driver files could be consolidated into a single file: Misc\TypeExtensions.

      This consolidation not only improves understanding the code base by centralizing all Type extension methods in one place, but will also eliminate some duplications across the two files.

            Assignee:
            Unassigned
            Reporter:
            Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: