private static async ValueTask <(bool matched, CandidateReason reason, SyntaxNode indexerReference)> ComputeIndexerMemberCRefInformationAsync( SemanticModel semanticModel, SyntaxNode node, SymbolsMatchAsync symbolsMatchAsync) { var(matched, reason) = await symbolsMatchAsync(node, semanticModel).ConfigureAwait(false); // For an IndexerMemberCRef the node itself is the indexer we are looking for. return(matched, reason, node); }
private static async ValueTask <(bool matched, CandidateReason reason, SyntaxNode indexerReference)> ComputeConditionalAccessInformationAsync( SemanticModel semanticModel, SyntaxNode node, ISyntaxFactsService syntaxFacts, SymbolsMatchAsync symbolsMatchAsync) { // For a ConditionalAccessExpression the whenNotNull component is the indexer reference we are looking for syntaxFacts.GetPartsOfConditionalAccessExpression(node, out _, out var indexerReference); if (syntaxFacts.IsInvocationExpression(indexerReference)) { // call to something like: goo?.bar(1) // // this will already be handled by the existing method ref finder. return(default);