You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm learing DiagnosticAnalyzer and I wonder one thing: why does RegisterSymbolStartAction not accept SymbolKind array but RegisterSymbolAction does?
What if I want to subscribe to SymbolKind.NamedType, SymbolKind.Field, SymbolKind.Property, SymbolKind.Method events? Now I'm forced to write RegisterSymbolStartAction for each SymbolKind.
This is probably the dumbest question but I I really wonder :)
I can assume that this is because SymbolKind.NamedType is parent syntax node and it's enough to process all child nodes.
But what if I want to process only some child nodes?
This discussion was converted from issue #49857 on December 13, 2020 11:34.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm learing
DiagnosticAnalyzer
and I wonder one thing: why doesRegisterSymbolStartAction
not acceptSymbolKind
array butRegisterSymbolAction
does?What if I want to subscribe to
SymbolKind.NamedType
,SymbolKind.Field
,SymbolKind.Property
,SymbolKind.Method
events? Now I'm forced to writeRegisterSymbolStartAction
for eachSymbolKind
.This is probably the dumbest question but I I really wonder :)
I can assume that this is because
SymbolKind.NamedType
is parent syntax node and it's enough to process all child nodes.But what if I want to process only some child nodes?
Beta Was this translation helpful? Give feedback.
All reactions