-
Notifications
You must be signed in to change notification settings - Fork 9
VS-146: Support Fully Qualified Names for Data Models #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| Builders<Person>.Filter.Eq(p => p.Name, MongoDB.Analyzer.Tests.Common.DataModel.StaticHolder.ReadonlyString) | | ||
| Builders<Person>.Filter.Eq(p => p.Name, MongoDB.Analyzer.Tests.Common.DataModel.StaticHolder.ReadonlyString2) | | ||
| Builders<Person>.Filter.Eq(p => p.Name, MongoDB.Analyzer.Tests.Common.DataModel.StaticHolder.ReadonlyString) | | ||
| Builders<Person>.Filter.Eq(p => p.Vehicle.VehicleType.Type, MongoDB.Analyzer.Tests.Common.DataModel.StaticHolder.ReadonlyEnum) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same naming pattern, no need to test all types.
Also consider combing Qualified_inside_method and Qualified_inside_namespace into single test with different naming nesting levels. Given A.B...X.Y.Class.Property is a full name, let's test:
A.B...X.Y.Class.Propert
B...X.Y.Class.Propert
X.Y.Class.Propert
Y.Class.Propert
Same for Builders<A.B...X.Y.Class>.
Also test cases like:
using user = MongoDB.Analyzer.Tests.Common.DataModel.User;
using driver = MongoDB.Driver;
_ = driver.Builders<user>.Filter.Eq(user => user.Age, 22);
_ = driver.Builders<MongoDB.Analyzer.Tests.Common.DataModel.User>.Filter.Eq(user => user.Age, 22);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| var isBuildersContainer = false; | ||
| var containsAlias = false; | ||
|
|
||
| //Check if Member Expression is Builders Container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add space after // in all comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| syntaxNode = (syntaxNode as MemberAccessExpressionSyntax)?.Expression; | ||
| } | ||
|
|
||
| //Skip Nodes that are Builder Containers and that don't contain alias |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add two examples in the comment:
// For example MongoDB.Driver.Builders, driverAlias.Builders
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
BorisDog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Good work!
Support Fully Qualified Names for Data Models