Repository navigation
IExpressionToCode with rules for FullTypeNames and fixed issue #13 - #42
Conversation
… of ToCode expression methods. added: Rules for specifying FullTypeNames and ExplicitMethodTypeArgs. fixed: #13 Explicit type parameters for methods omitted - Instead of inferring which is complex task, I want to have setting to turn it on for my use case, and be off by default.
added: Propagation of FullTypeNames option from ExpressionToCodeImpl to ObjectToCode. changed: Made CSharpFriendlyTypeName public to be used in generation scenarios alongside with ToCode.
|
While I think this is a good, I have a mild preference to avoid new public API until the dust has settled; and I'm sure this isn't going to be the only rule that needs parameterization. Options:
I think I've got a preference for option 2 - that way it's usable if you're in an experimental mood, but automatic upgrades aren't broken yet. I think this would also be a good place to integrate several of @asd-and-Rizzo suggestions, who noticed inconsistencies in naming, such as the namespace |
There was a problem hiding this comment.
This doesn't need to be public, right?
There was a problem hiding this comment.
No, I made it public because I need it in my gen scenario: dictionary of Type -≥ Expression Code. So I need Type literal. I have similar utility method in DryIoc, but yours covers more cases.
There was a problem hiding this comment.
Or, suddenly! Could I use ObjectToCode? If so, then it is fine to stay internal.
|
Right, there are still a few fairly small points - can you address those? I'd love to get this feature merged. Incidentally, if you want, I can give you commit access to this repo directly. I still like the PR model, but that can make further development easier, and some small refactorings don't work well in a PR (mass renames, trivial inlines; things like the If this is all too much work; I get that too - thanks for the great contributions so far! |
|
Let's summarize the PR issues so far:
My plan is to look into code this week, and try to address those. |
|
On However, this is a minor point, not blocking for a merge. |
|
Oh, I see. Agree. |
added: ObjectToCode.Default and ObjectToCode.WithFullTypeNames predefined instances. YAGNI for now. changed: Inlined Rules into ExpressionToCode - too much overhead for such a simple setup. changed: Made ExpressionToCode depend on IObjectToCode implementation. Merge branch 'master' of https://github.com/EamonNerbonne/ExpressionToCode
|
Hi, |
|
Hello, may be it is easy to provide me commit rights? |
IExpressionToCode with rules for FullTypeNames and fixed issue #13
|
Hi Maksim, I added you to the contributors list & merged this PR - I'm definitely happy with where it's going :-). However, there are a few issues with these changes currently that make releasing this version to nuget less that ideal:
Sorry for the ridiculously long delay! |
Compared to previous PR: fixed full generic type name.