/// <summary> /// Method used to collect orchestrator methods and methods used in orchestrators that are defined in /// the solution. Call this on a DiagnosticAnalyzer by registering actions on SyntaxKind.MethodDeclaration. /// </summary> /// <param name="context"></param> public void FindOrchestratorMethods(SyntaxNodeAnalysisContext context) { var semanticModel = context.SemanticModel; var symbol = context.ContainingSymbol; if (symbol != null && context.Node is MethodDeclarationSyntax declaration && SyntaxNodeUtils.IsInsideOrchestratorFunction(semanticModel, declaration)) { var methodInformation = new MethodInformation() { SemanticModel = semanticModel, Declaration = declaration, DeclarationSymbol = symbol, }; if (!this.orchestratorMethodDeclarations.ContainsKey(symbol)) { this.orchestratorMethodDeclarations.Add(symbol, methodInformation); this.FindInvokedMethods(semanticModel, methodInformation); } } }