Пример #1
0
        public static IComparisonWithAdvance HTMLTag(
            ILog log,
            Options options,
            string tagName,
            OrComparison attributes,
            string name = null)
        {
            ICharComparison isWhitespace   = IsWhitespace(log);
            IOperation      skipWhitespace = SkipWhitespace(log);

            StatementList statementList = new StatementList(log);

            statementList.Name = name;

            statementList.Add(new CharComparison(log, options, '<'));
            statementList.Add(new StringComparison(log, options, tagName));
            statementList.Add(isWhitespace);

            // The reason for the or list is in case the tags appear in a different order on different browsers
            DelimitedListComparison list = new DelimitedListComparison(log, options, attributes, isWhitespace);

            statementList.Add(list);
            list.MinAmount = attributes.Count;
            list.MaxAmount = attributes.Count;

            statementList.Add(skipWhitespace);
            statementList.Add(new CharComparison(log, options, '>'));

            return(statementList);
        }
Пример #2
0
        //~V

        public NotCharComparison(
            ILog log,
            ICharComparison charComparison) : base(log)
        {
            m_CharComparison = charComparison;
        }