[CSHARP-3584] LINQ3: Replace multiple copies of GetMongoQueryProvider with a single GetCollectionInfo extension method Created: 19/Apr/21  Updated: 28/Oct/23  Resolved: 04/Oct/21

Status: Closed
Project: C# Driver
Component/s: LINQ3
Affects Version/s: None
Fix Version/s: 2.14.0

Type: Task Priority: Unknown
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: CSHARP-2608

 Description   

There is more than one place where we have a helper method called GetMongoQueryProvider which is used to find the MongoQueryProvider from the inner parameter to one of the Join methods.

Replace it with a single extension method GetCollectionInfo that returns two values like:

var (innerCollectionName, innerSerializer) = innerExpression.GetCollectionInfo(containerExpression: expression);

The reason for the name change and the return value changes is that we don't actually care about the query provider, the query provider is just an intermediate step in getting the underlying inner collection and serializer info.



 Comments   
Comment by Robert Stam [ 19/Apr/21 ]

Done but not reviewed

Generated at Wed Feb 07 21:45:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.