public AnalysisCallNode(string methodName, TypeDescriptor declaredType, LocationDescriptor location) : base(methodName, declaredType) { this.LocationDescriptor = location; this.InMethodOrder = location.InMethodOrder; }
// Original version using locations internal ISet<MethodDescriptor> GetCallees(IMethodSymbol method, LocationDescriptor locToFilter) { var result = new HashSet<MethodDescriptor>(); var methodDescriptor = Utils.CreateMethodDescriptor(method); //var methodEntity = this.solutionAnalyzer.Dispatcher.GetEntity(new MethodEntityDescriptor<methodDescriptor>(methodDescriptor)) as MethodEntity<ANode,AType,methodDescriptor>; var methodEntityProcessor = (MethodEntityProcessor) this.solutionAnalyzer.Dispatcher.GetEntityWithProcessorAsync(EntityFactory.Create(methodDescriptor, this.solutionAnalyzer.Dispatcher)).Result; var methodEntity = methodEntityProcessor.MethodEntity; if (!methodEntity.HasBeenPropagated) methodEntityProcessor.DoAnalysis(); var callSitesForMethod = methodEntityProcessor.GetCalleesInfo(); // var locToFilter = new ALocation(l); foreach(var callSiteNode in callSitesForMethod.Keys) { var loc = ((AnalysisCallNode)callSiteNode).LocationDescriptor; if (loc.Equals(locToFilter)) { foreach (var calleemethodDescriptor in callSitesForMethod[callSiteNode]) { var callee = calleemethodDescriptor; result.Add(callee); } } } return result; }