[DRAFT] Add Roslyn lookup based on metadata#35
[DRAFT] Add Roslyn lookup based on metadata#35Emptycz wants to merge 2 commits intoMattParkerDev:mainfrom
Conversation
|
Thanks for looking into this! Do you know if |
|
Hi, sorry for the delay, I was completely offline during the xmas as I was visiting lots of relative and I am in the middle of switching jobs, haha. I'll look into the issue of decompiling NuGet packages, as I personally have no idea, but right now, it does not work. I would guess, though, that it should probably be supported. To my understanding, it's "just" decompiling CIL into C#, and I would assume the sdk dlls comes in the same form as the NuGet packages. |
|
@Emptycz you can use ILSpy engine (its non-WPF part) to decompile assemblies/NuGet packages back to C#. Actually VS decompilation is built upon ILSpy at this moment. |
This is my very first open-source contribution, so I apologise for any mistakes with this PR or my approach to contributing!
This is still in draft (there is a lot of missing parts -- see the Issues todo-list below)
Overview:
This PR should add the generation of temporary files based on metadata. The goal is to have "jump to definition" (ctrl + click) feature not only for in-solution classes/methods (that's already implemented), but also for built-in methods in the framework or language. This adds that.
It is only a concept and a draft. Right now it works kind of correctly. When testing with ASP.Net framework (building APIs), I can jump into generated definition of built-in methods, such as

.MapHub<T>(string route):When

CTRL+clickon.MapHub, it generates a new temporary file and opens it in the editor. Unfortunately, the highlighter breaks right now, and it does not seem to work for built-in classes, such as Exceptions, or Task, etc. The result looks like this.Also, I apologise for the foreign language; the compiler seems to be generating parts of the comments in the system language, I guess?
Issues Todo-list: