Store generated location of class name on a `RazorCodeDocument`
Open
Area-Razor
Area-Razor-Compiler
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
There are a couple of spots where we use the C# syntax tree to find the class declaration in the generated C# file for a Razor document.
* In Implement Abstract Interface support, to expand our code action range
* In Go To Def and Find All Refs, to detect when Roslyn wants to navigate users to the class
We could have the compiler store the location of the class name somewhere, either the `RazorCodeDocument` or the tree it contains, which would mean these features could avoid needing to ask Roslyn to parse the generated tree, which could save time and memory.
Contributor guide
Assessment
This issue has not been assessed yet.