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

Client.Cluster.DescriptionChanged Issue when upgrade to version 3.00

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Blocker - P1 Blocker - P1
    • None
    • Affects Version/s: 3.0.0
    • Component/s: API
    • Dotnet Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
         Individual cluster events have been removed from Client.Cluster so users who may have been previously subscribing to those events from Client.Cluster will have to update their code to use ClusterBuilder.Subscribe instead. This is a breaking change and should be added to the 3.0 breaking changes docs.

      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?
        3.0+

      Show
      1. What would you like to communicate to the user about this feature?    Individual cluster events have been removed from Client.Cluster so users who may have been previously subscribing to those events from Client.Cluster will have to update their code to use ClusterBuilder.Subscribe instead. This is a breaking change and should be added to the 3.0 breaking changes docs. 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?   3.0+

      in version 2.9 and earlier, I could subscribe to DescriptionChanged event in Client.Cluster and then later check if DB is connected by examining MongoDB.Driver.Core.Clusters.ClusterDescriptionChangedEventArgs

      Please let me know how to re-write the following code to listen to the event again in version 3.0.

      // code placeholder
      var mongoClient1 = new MongoClient(settings);
      var db = _mongoClient1.GetDatabase("myDb);
      
      db.Client.Cluster.DescriptionChanged += Db1ClusterDescriptionChanged;
      
      
       

            Assignee:
            adelin.mbidaowona@mongodb.com Adelin Mbida Owona
            Reporter:
            sasan.pasha@gmail.com Sasan Pasha
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: