Skip to content

[Proposal] Provide a way to opt-in specified optional parameters decorated with CallerMemberName, CallerArgumentExpression, CallerFilePath, CallerLineNumber as a warning or error #8382

Discussion options

You must be logged in to vote

When you want to report an error on code based on presence of an attribute, the best way to do that is through an analyzer. This woudl be a very simple one to write, where you just analyzer IArgumentOperations, see if they are mapping to a parameter which has such an attribute, and if hte argument is implicit or not.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by CyrusNajmabadi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants