protected override bool CheckCallGraph(IMethodDeclaration methodDeclaration, IReadOnlyCallGraphContext context) { var declaredElement = methodDeclaration.DeclaredElement; return(!myExpensiveContextProvider.IsMarkedStage(declaredElement, context) && base.CheckCallGraph(methodDeclaration, context)); }
protected override bool CheckCallGraph(IMethodDeclaration methodDeclaration, IReadOnlyCallGraphContext context) { var callGraphReady = UnityCallGraphUtil.IsCallGraphReady(myConfiguration); if (!callGraphReady) { return(false); } var declaredElement = methodDeclaration.DeclaredElement; return(myExpensiveContextProvider.IsMarkedStage(declaredElement, context)); }
protected override void Analyze(IInvocationExpression expression, IHighlightingConsumer consumer, IReadOnlyCallGraphContext context) { var callee = CallGraphUtil.GetCallee(expression); if (PerformanceCriticalCodeStageUtil.IsInvokedElementExpensive(callee as IMethod) || myContextProvider.IsMarkedStage(callee, context)) { CreateHighlighting(expression, consumer); } }