Beispiel #1
0
        /// <inheritdoc />
        public override void VisitMethodCall(MethodCall call)
        {
            base.VisitMethodCall(call);

            if (IsFirstTargetMethodCall(call))
            {
                var node = call.GetCalledNode();
                if (node != null)
                {
                    _calledNodes.Add(node);
                }
            }
            else if (_calledNodes.Count != 0 && IsSecondTargetMethodCall(call))
            {
                var node = call.GetCalledNode();
                if (_calledNodes.Contains(node))
                {
                    Problems.Add(CreateProblem(call));
                }
            }
        }