public static IEnumerable <IEnumerable <IPlanIssueResult> > RunChecks(XElement statement, CheckParameters checkParameters)
        {
            if (statement == null)
            {
                throw new ArgumentNullException("statement");
            }
            if (checkParameters == null)
            {
                throw new ArgumentNullException("checkParameters");
            }
            var statementArgs = new StatementArgs(statement);

            foreach (var check in _statementChecks)
            {
                yield return(check.Check(statement, checkParameters, statementArgs));
            }

            if (statement.Name != el.StmtSimple)
            {
                yield break;
            }
            var relOps = statement.Descendants(el.RelOp);

            foreach (var relOp in relOps)
            {
                var relOpArgs = new RelOpArgs(relOp);
                foreach (var check in _relOpChecks)
                {
                    yield return(check.Check(relOp, checkParameters, statementArgs, relOpArgs));
                }
            }
        }
        public virtual IEnumerable <IPlanIssueResult> Check(XElement xElement, CheckParameters checkParameters, StatementArgs statementArgs = null, RelOpArgs relOpArgs = null)
        {
            // ReSharper disable once SimplifyLinqExpression
            if (!this.Matches.Any(x => x == xElement.Name))
            {
                return(Enumerable.Empty <IPlanIssueResult>());
            }

            this.CheckParameters = checkParameters;
            this.StatementArgs   = statementArgs;
            this.RelOpArgs       = relOpArgs;

            return(this.GetIssues(xElement));
        }