Esempio n. 1
0
        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));
        }
Esempio n. 3
0
        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);
            }
        }