File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
src/DendroDocs.Tool/Analyzers Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -75,17 +75,12 @@ public override void VisitInvocationExpression(InvocationExpressionSyntax node)
75
75
var containingType = symbolInfo . Symbol ? . ContainingSymbol ?? symbolInfo . CandidateSymbols . FirstOrDefault ( ) ? . ContainingSymbol ;
76
76
var containingTypeAsString = containingType ? . ToDisplayString ( ) ?? string . Empty ;
77
77
78
- var methodName = string . Empty ;
79
-
80
- switch ( node . Expression )
78
+ var methodName = node . Expression switch
81
79
{
82
- case MemberAccessExpressionSyntax m :
83
- methodName = m . Name . ToString ( ) ;
84
- break ;
85
- case IdentifierNameSyntax i :
86
- methodName = i . Identifier . ValueText ;
87
- break ;
88
- }
80
+ MemberAccessExpressionSyntax m => m . Name . ToString ( ) ,
81
+ IdentifierNameSyntax i => i . Identifier . ValueText ,
82
+ _ => string . Empty
83
+ } ;
89
84
90
85
var invocation = new InvocationDescription ( containingTypeAsString , methodName ) ;
91
86
statements . Add ( invocation ) ;
You can’t perform that action at this time.
0 commit comments