-
Notifications
You must be signed in to change notification settings - Fork 199
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
Find All References doesn't work on [Parameter] Setters anymore #11561
Comments
This will be because of FUSE. If we have a component
I'm guessing FUSE doesn't have the type inference helpers any more. |
Some more context: @AdmiralSnyder was using this to distinguish between when the property is specified as an attribute, versus referenced in code like |
Maybe this is a test case for "How do we deal with code-gen that makes the IDE better in a post-FUSE world?" |
Technically, the setter is not referenced, it's only called by the aspnetcore runtime via reflection (I think). I guess it would be nice (and more performant although I'm not sure about that) if the compiler emitted something like builder.AddComponentParameter(static (c, v) => c.Param = v, value); instead of builder.AddComponentParameter(nameof(Component.Param), value); Otherwise, couldn't we introduce some API where we would tell Roslyn arbitrary mappings from Razor without the need for backing C# code? The source generator could emit these mappings. Like |
We talked about this issue in the working group meeting today and Dan brought up that there is actually an issue for something like that: dotnet/aspnetcore#29550
I think there is definitely room for more interesting hooks into Roslyn once cohosting is a real thing. |
I used to be able to find the places where the parameters of a razor component were used by clicking into the {get; set;} and hitting Shift-F12 - this apparently broke in VS 17.13 (nor does it work in VS 17.14 preview)
clicking into the get and hitting Shift-F12 still lists the places where the parameter is used, apparently.
The text was updated successfully, but these errors were encountered: