Skip to content
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

Include assembly name in decompiled code #2810

Merged
merged 1 commit into from
Nov 3, 2022

Conversation

miloush
Copy link
Contributor

@miloush miloush commented Oct 21, 2022

Problem

When exploring decompiled methods and other members and jumping all around through analysis tree, inheritance etc., it is difficult to figure out to which assembly the currently displayed code belongs. On has to scroll the treeview to an exact narrow position, or just keep collapsing it manually.

Solution

The proposed solution is to include the assembly name as a comment above the existing comment containing full type name.

Another approach would be to include it with the type comment in CSharpAmbience.ConvertSymbol, possibly using ConversionFlags.UseAssemblyName, but that seemed unnecessarily complex.

Namespaces do not show assembly because it is not readily available around.

This does not come with tests, happy to add some if deemed necessary and given some pointers whereabouts are similar tests e.g. for the type comment. assembly cannot be null because CreateDecompiler already dereferences it.

@siegfriedpammer siegfriedpammer merged commit 65e4864 into icsharpcode:master Nov 3, 2022
@siegfriedpammer
Copy link
Member

Thank you very much for your contribution!

@miloush miloush deleted the assembly-name branch April 18, 2023 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants