-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Generic type parameter being removed while using ConvertToCSharpSource
#92
Comments
@ZacharyPatten Ok, I think I found the problem: For the first iteration
|
Thanks for the info, I was able to replicate the issue. This should be an easy fix. It may be as simple as changing Line 557 in f291d37
But I need to do a bit more testing to validate. The unit tests are here: Towel/Tools/Towel_Testing/Meta.cs Line 16 in f291d37
So I'll be creating a new branch and adding a/some unit tests to cover this topic. |
Thanks! |
Once the fix is ready I will create a release in the GitHub repo. There is a GitHub action that when a release is created on the repo, it will deploy a nuget package. It takes ~5-10 minutes for the nuget package to show up, so give it a few minutes after the release in the repo is created and you should see it in nuget.org and package explorer. GitHub Action for nuget package deployments: https://github.com/ZacharyPatten/Towel/blob/main/.github/workflows/Towel%20Deployment.yml |
Thank you! :) |
@eestein I pushed an update. If the update did not fix your issue we can re-open this issue. To be honest I can't remember why I decided to make the Towel/Tools/Towel_Testing/Meta.cs Line 120 in ab85339
So there is probably additional improvement that can be done to to code. Regardless, thank you for addressing this issue. :) |
I agree it makes sense to keep it true by default, that's how I'm using it anyway :D Thank you for the quick fix, I've already tested it and it's working! I just ran into another issue now, but I'm debugging to see if the problem is on my end. I'll open another bug, if necessary. Thanks again! |
While using
ConvertToCSharpSource
on a parameter's type:parameterInfo.ParameterType.ConvertToCSharpSource(true)
The type parameter is being excluded:
Here's the original code:
Expression<Func<TEntity, bool>> predicate = null
As you can see,
TEntity
has been removed.What seems weird is that the Type contains the
TEntity
reference:And that the same call to a method's return type includes the type parameter:
method.ReturnType.ConvertToCSharpSource(true)
@ZacharyPatten I'm filing this as a bug, because it seems like so, but please let me know if there's something wrong I'm doing or expecting...
Thanks.
EDIT: just as an extra info (I'm debugging, trying to find out where the problem is), the generic arguments seem to be all there:
The text was updated successfully, but these errors were encountered: