-
Notifications
You must be signed in to change notification settings - Fork 586
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
Pass in genericParamProvider #555
Conversation
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.
Could you explain what this PR improves?
Some code depends on |
3089444
to
5155d6f
Compare
If uses dnlib to import a TypeSig from one ModuleDefMD to another ModuleDefMD, we shouldn't assume the imported TypeSig is in the same gp context. Even in the same ModuleDefMD, just importing a TypeSig from one type to another, the gp context is indeterminate. |
I think GenericParamContext is designed as:
rather than use:
In this PR, preparing different Importers/GenericParamContexts are unnecessary in some cases, just module.Import(...)
I don't understand, can you explain more? |
gp context is a parameter designed for display. You can leave it empty. |
Yes, that's why I check |
Almost all existing code does not pass gp context, even de4dot, ConfuserEx. When the gp context is empty, it cannot be assumed that the gp context of TypeSig is consistent with the original one. |
If the gp context is empty, everything is null, what do you mean
Yes, otherwise we can't get the correct FullName when our code calls generic members defined in other assembly, eg: |
No description provided.