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

Remove the ConnectionWrapper, ConnectionHandle and ReferenceCountedConnection classes

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.0
    • None
    • Connectivity
    • None

    Description

      The ConnectionWrapper (and ConnectionHandle) classes are base classes that handle forwarding all properties and methods to the wrapped class. Derived classes only need to override the methods they are interested in and let the base class forward the rest.

      But this is just implementation inheritance at heart. Also, if the derived classes end up overriding all the members then nothing was gained anyway (the derived class could just as easily have forward the intercepted members to a wrapped object as to the base class).

      The ReferenceCountedConnection is also not really needed. We could use the ReferenceCounted<T> class instead.

      Removing these classes would also bring this part of the code base more in line with how the rest of the code base is handling wrapping and reference counting.

      Attachments

        Activity

          People

            craig.wilson@mongodb.com Craig Wilson
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: