public static Operator[] CreateComparableListValueOperators(ListValue defaultListValue)
 {
     return(CreateListValueOperators(defaultListValue).Concat(new Operator[]
     {
         new IsGreaterThanListValueOperator(defaultListValue),
         new IsLessThanListValueOperator(defaultListValue),
         new IsListValueInRangeOperator(ListValueRange.Create(defaultListValue, defaultListValue)),
     }).ToArray());
 }
        public override bool TryParse(string value, out Value val)
        {
            val = null;
            var match = ParseRegEx.Match(value);

            if (match.Success && _listValueParser.TryParse(match.Groups[1].Value, out var from) &&
                _listValueParser.TryParse(match.Groups[2].Value, out var to))
            {
                val = ListValueRange.Create(from as ListValue, to as ListValue);
                return(true);
            }

            return(false);
        }
Ejemplo n.º 3
0
 protected bool Equals(ListValueRange other)
 {
     return(From.Equals(other.From) && To.Equals(other.To));
 }