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

Remove checks for session been passed as null

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Icon: Unknown Unknown
    • None
    • None
    • None
    • None

    Description

      Currently most calls that take a session validate its been passed though and don't accept null.

      This seems redundant on the session parameter. As on a users side we have to check if we have a session or not and call with different arguments when internally you accept null anyway.

      For an example the Find extensions methods require IClientSession but internally it just makes an instance of FindFluent which doesn't have the same restriction. 

      So we can actually just make an instance of this and bypass the extension but shouldn't the extension methods have the same restrictions?

       

      Attachments

        Activity

          People

            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            j.singleton7887@gmail.com Jason Singleton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: