Example #1
0
 private static IEnumerable <SyntaxNode> GetSimpleReferences(SyntaxNode syntax)
 {
     if (syntax is RefTypeSyntax refType)
     {
         return(refType.Type.AsEnumerable());
     }
     if (syntax is LiteralExpressionSyntax literal && literal.Kind() == SyntaxKind.ArgListExpression)
     {
         return(Utils.Concat(literal.AsEnumerable(), literal.FindReferences()));
     }
     if (syntax is InterpolatedStringExpressionSyntax @string)
     {
         return(Utils.Concat(@string.AsEnumerable(), @string.FindReferences()));
     }
     return(syntax.AsEnumerable());
 }