The Wayback Machine - https://web.archive.org/web/20200606043249/https://github.com/icsharpcode/ILSpy/issues/1833
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

CSharpDecompiler.DecompileWholeModuleAsSingleFile() name confusing #1833

Open
Piedone opened this issue Dec 1, 2019 · 2 comments
Open

CSharpDecompiler.DecompileWholeModuleAsSingleFile() name confusing #1833

Piedone opened this issue Dec 1, 2019 · 2 comments

Comments

@Piedone
Copy link

@Piedone Piedone commented Dec 1, 2019

I'd suggest renaming CSharpDecompiler.DecompileWholeModuleAsSingleFile() to DecompileWholeModuleAsSingleSyntaxTree() as in my understanding it's not really doing anything with a single file. The documentation on the method reinforces this: "Decompiles the whole module into a single syntax tree.".

Am I missing something?

@dgrunwald
Copy link
Member

@dgrunwald dgrunwald commented Dec 4, 2019

Well if you think about the compiler's input, each syntax tree is a file.
Roslyn went with SyntaxTrees in the compilation; but ILSpy is based on NRefactory which used Files for the same thing.

@Piedone
Copy link
Author

@Piedone Piedone commented Dec 5, 2019

Hmm OK, I see, so "AsSingleFile" refers to the input, not the output. Knowing the context now makes it clear and my DecompileWholeModuleAsSingleSyntaxTree suggestion is wrong.

I'm not a native English speaker but for me, this wording is still strange and initially, I dismissed this method since I didn't want to receive a file. However, I don't really have a better suggestion, so if you'd like then please close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.