private IEnumerable <ISymbol> GetOtherSubstitutionsForSymbol(SemanticModel semanticModel, SyntaxNode rootNode, ISymbol rootNodeSymbol)
        {
            if (rootNodeSymbol == null)
            {
                yield break;
            }

            var rootIdentifierNode = GetIdentifierExpressionSyntax(rootNode);

            if (rootIdentifierNode == null)
            {
                yield break;
            }

            var rootIdentifierSymbol = semanticModel.GetSymbolInfo(rootIdentifierNode);

            if (rootIdentifierSymbol.Symbol == null)
            {
                yield break;
            }

            var ancestorChildNodes = rootNode.Ancestors().SelectMany(ancestor => ancestor.ChildNodes());

            foreach (var syntaxNode in GetPotentialOtherSubstituteInvocations(ancestorChildNodes))
            {
                var symbol = semanticModel.GetSymbolInfo(syntaxNode).Symbol;
                if (symbol.IsReturnLikeMethod() == false)
                {
                    continue;
                }

                var substitutedNode = _substitutionNodeFinder.FindForStandardExpression(syntaxNode, symbol as IMethodSymbol);

                var substituteNodeSymbol = semanticModel.GetSymbolInfo(substitutedNode).Symbol;
                if (substituteNodeSymbol != rootNodeSymbol)
                {
                    continue;
                }

                var substituteNodeIdentifier = GetIdentifierExpressionSyntax(substitutedNode);

                var substituteIdentifierSymbol = semanticModel.GetSymbolInfo(substituteNodeIdentifier);
                if (rootIdentifierSymbol.Symbol == substituteIdentifierSymbol.Symbol)
                {
                    yield return(substituteNodeSymbol);
                }
            }
        }
        private void AnalyzeInvocation(SyntaxNodeAnalysisContext syntaxNodeContext)
        {
            var invocationExpression = syntaxNodeContext.Node;
            var methodSymbolInfo     = syntaxNodeContext.SemanticModel.GetSymbolInfo(invocationExpression);

            if (methodSymbolInfo.Symbol?.Kind != SymbolKind.Method)
            {
                return;
            }

            var methodSymbol = (IMethodSymbol)methodSymbolInfo.Symbol;

            if (methodSymbol.IsReturnOrThrowLikeMethod() == false)
            {
                return;
            }

            AnalyzeMember(syntaxNodeContext, _substitutionNodeFinder.FindForStandardExpression((TInvocationExpressionSyntax)invocationExpression, methodSymbol));
        }