예제 #1
0
 private static string[] GetOperations(Type type)
 {
     if (RuleConstraint.IsNumericType(type))
     {
         return(new[] { OperatorConstants.Equal, OperatorConstants.NotEqual, OperatorConstants.Greater, OperatorConstants.Less });
     }
     return(new[] { OperatorConstants.Equal, OperatorConstants.NotEqual, OperatorConstants.Contain, OperatorConstants.NotContain });
 }
예제 #2
0
        public bool DoesNotSatisfy(RuleConstraint condition)
        {
            if (!ParameterNames.Any(x => condition.Name.Equals(x)))
            {
                return(false);
            }
            var parameterName = ParameterNames.First(condition.Name.Equals);

            return(condition.IsValueDifferent(DataObject[parameterName]));
        }