public override bool IsMatch(ref PathReader pathReader)
        {
            if (pathReader.CurrentSegmentLength > 0)
            {
                pathReader.ConsumeInSegment(pathReader.CurrentSegmentLength);
            }

            return(true);
        }
Esempio n. 2
0
        public override bool IsMatch(ref PathReader pathReader)
        {
            if (pathReader.IsPathSeparator())
            {
                return(false);
            }

            pathReader.ConsumeInSegment(1);
            return(true);
        }
Esempio n. 3
0
        public override bool IsMatch(ref PathReader pathReader)
        {
            var result = !_range.IsInRange(pathReader.CurrentText[0]);

            if (result)
            {
                pathReader.ConsumeInSegment(1);
            }

            return(result);
        }
Esempio n. 4
0
        public override bool IsMatch(ref PathReader pathReader)
        {
            var index = pathReader.CurrentText.IndexOfAny(_characters);

            if (index == -1)
            {
                return(false);
            }

            if (index > 0)
            {
                pathReader.ConsumeInSegment(index);
            }

            return(true);
        }
        public override bool IsMatch(ref PathReader pathReader)
        {
            var c = pathReader.CurrentText[0];

            if (CharacterRangeSegment.IsAsciiUpper(c))
            {
                c = char.ToLowerInvariant(c);
            }

            var result = _range.IsInRange(c);

            if (result)
            {
                pathReader.ConsumeInSegment(1);
            }

            return(result);
        }