[Proposal] Provide a way to opt-in specified optional parameters decorated with CallerMemberName, CallerArgumentExpression, CallerFilePath, CallerLineNumber as a warning or error #8382
-
Most of the time when using For example:
Options
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
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.