Skip to content
Discussion options

You must be logged in to vote

This is already doable in the language. Use attributes to demarcate the types of interest (attributes can be generic, or can use typeof(T) in them). THen, as you say:

Analyzer approach: Roslyn-based analyzer enforcing rules and producing clear compile-time diagnostics.

You just write an analyzer that checks with whatever rules you care about.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@philipkalimo
Comment options

Answer selected by philipkalimo
Comment options

You must be logged in to vote
7 replies
@philipkalimo
Comment options

@HaloFour
Comment options

@HaloFour
Comment options

@philipkalimo
Comment options

@ufcpp
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #9727 on September 30, 2025 11:29.