ReSharper | Navigate | Navigate To | Decompiled Sources
Alt+` | Decompiled Sources (ReSharper_NavigateToDecompiledSources
)
This command allows you to navigate to declarations of library types and methods reconstructed by decompilation. Decompiled source code is shown in the editor as a reconstructed source file, in read-only mode. All relevant ReSharper's navigation and search commands are available in the decompiled view.
The command becomes available when you invoke Navigate To on a library symbol in your source code and on decompiled sources. You can invoke this command from the Solution Explorer, from the File Structure window and other tool windows.
If you need to analyze only signatures of the symbols reconstructed from metadata, use the Navigate To Metadata View command. If you need to analyze the symbols in their original source files, use the Navigate To Sources from Symbol Files.
If necessary, you can make decompiled sources the default navigation option for implicit navigation to compiled code, (for example when you go to declaration of System.String
). To learn how to do so, see Navigate compiled code.
If the target symbol has XML documentation comments, they are included in the decompiled sources.
This command is not available if the Default Visual Studio Navigation is selected in the Tools | External Sources page of ReSharper options. To make it available, select any other option in this group.
This feature is supported in the following languages and technologies:
The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see corresponding topics in the ReSharper by language section.
A solution is not limited to source code of your projects, it also contains references to libraries that are used in your solution. It is very convenient to have access and opportunity to navigate to symbols from those libraries as if they were a part of your solution. ReSharper provides a built-in decompiler and a lot of features that help you view and navigate through compiled code.
Code presentation of symbols from compiled assemblies depends on the settings, on the availability of PDB information, and on the applied navigation command.
There are two types of navigation commands that target library symbols:
-
Commands that explicitly specify where and how to represent library symbols:
-
Commands that may implicitly lead to compiled code when the target symbol is not in the source code of your solution. For example,
For the second type of commands, you can specify how ReSharper will represent library symbols. When this kind of navigation is performed for the first time, you will see a dialog, suggesting to choose the default navigation action:
You can configure the default navigation on the Tools | External Sources page of ReSharper options (Alt+R, O).
You can also explore source code of any assembly outside your solution using the Assembly Explorer window. For more information, see Explore and decompile assemblies.
If at any point you would like to clear the decompilation cache, remove the data in %LOCALAPPDATA%\JetBrains\Shared\vAny\DecompilerCache.
See also
Procedures
标签:ReSharper,code,Resharper,Sources,Decompiled,Navigate,navigation
来源: https://www.cnblogs.com/chucklu/p/16439910.html