public static IParameterSymbol GetCorrespondingParameter(this AttributeArgumentSyntax argumentSyntax, SyntaxNodeAnalysisContext context) { var argumentPosition = argumentSyntax.GetArgumentPosition(); var calledMethodSymbol = argumentSyntax.GetCalledMethod(context); return(argumentPosition < calledMethodSymbol?.Parameters.Length ? calledMethodSymbol.Parameters[argumentPosition] : null); }