Skip to content

Store generated location of class name on a RazorCodeDocument #13139

@davidwengier

Description

@davidwengier

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-compilerUmbrella for all compiler issues

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions