protected override NumberRange GetNumberRange(Match match, UnitCoderBase coder)
        {
            NumberRange result = new NumberRange();

            result.End = new NumberValue(GetNumber(match.Groups["end"], coder).Value);
            Group startGroup = match.Groups["from"];

            if (startGroup.Success)
            {
                result.Start = new NumberValue(GetNumber(match.Groups["start"], coder).Value);
            }
            return(result);
        }
Esempio n. 2
0
        protected override NumberRange GetNumberRange(Match match, UnitCoderBase coder)
        {
            var         number = new NumberValue(GetNumber(match.Groups["number"], coder).Value);
            NumberRange result = new NumberRange();

            if (match.Groups["great"].Success)
            {
                result.Start = number;
            }
            else
            {
                result.End = number;
            }
            return(result);
        }
Esempio n. 3
0
 public TextRange(NumberRange range, string leftContext, string rightContext)
 {
     Range        = range;
     LeftContext  = leftContext;
     RightContext = rightContext;
 }
Esempio n. 4
0
 public TextRange(NumberRange range, IEnumerable <UnitTextBase> units, int contextLength)
 {
     Range        = range;
     LeftContext  = GetLeftContext(units, range.StartPosition, contextLength);
     RightContext = GetRightContext(units, range.EndPosition, contextLength);
 }