-
Notifications
You must be signed in to change notification settings - Fork 618
Mark method as used #1449
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
Mark method as used #1449
Conversation
This change lets VS see the HasMultipleReplicas as actually used. Otherwise, the backing file gets an IDE0051 Member unused diagnostic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very curious how HasMultipleReplicas="HasMultipleReplicas(context)"
worked without the @... do you know?
I don't know. Could just be an IDE issue. @davidwengier do you know? |
The only way I could see this change having an effect is if the compiler didn't emit anything when the As far as I know the Just opening Aspire.sln, and Resources.razor.cs, I don't see any IDE0051 warnings in my error list 🤷♂️ |
I also did not see any error. I approved on the basis of both being identical (and most of the other method calls in attribute values having an @ in the file), but we might want to file an issue with Roslyn. |
I'm not showing IDE0051 with the pages open, and my code lens references show the reference properly (the screenshot above shows zero). I wonder if
is the most likely thing here. |
The rules around optional |
Logged dotnet/razor#9740 |
This no longer repros for me. |
This change lets VS see the
HasMultipleReplicas
as actually used. Otherwise, the backing file gets an IDE0051 Member unused diagnostic.Microsoft Reviewers: Open in CodeFlow