-
-
Notifications
You must be signed in to change notification settings - Fork 35
feature: non-trivial instance construction #30
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
feature: non-trivial instance construction #30
Conversation
src/Dapper.AOT.Analyzers/CodeAnalysis/DapperInterceptorGenerator.cs
Outdated
Show resolved
Hide resolved
src/Dapper.AOT.Analyzers/CodeAnalysis/DapperInterceptorGenerator.cs
Outdated
Show resolved
Hide resolved
src/Dapper.AOT.Analyzers/CodeAnalysis/DapperInterceptorGenerator.cs
Outdated
Show resolved
Hide resolved
test/Dapper.AOT.Test/Interceptors/QueryCustomConstruction.output.cs
Outdated
Show resolved
Hide resolved
mgravell
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.
looking good; tiny nit on the spacing - petty but worth fixing; I suggest we merge after that, but a possible follow-up / extension (separate PR) would be to maybe take the same idea but generalized to include factory methods, i.e. [DapperAot] public static Foo Create(int id, DateTime when, string whatever) - very similar rules, but different nuances - for example, we can't support init-only members after a factory, but we can still support settable props, i.e.
var obj = Foo.Create(value0, value2, value1);
obj.Blah = value4;thoughts?
sure, created an issue for follow-up: #34 |
Closes #28