Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RangeCriterion"/> class with the specified name, operator, and values
 /// </summary>
 /// <param name="name"></param>
 /// <param name="operator"></param>
 /// <param name="startValue"></param>
 /// <param name="endValue"></param>
 public RangeCriterion(string name, ConditionOperatorType @operator, object startValue, object endValue)
 {
     this.Name       = name;
     this.Operator   = @operator;
     this.StartValue = startValue;
     this.EndValue   = endValue;
 }
Exemple #2
0
        private static string GetOperatorSymbol(SerializedProperty operatorProp)
        {
            int operatorEnumValueIndex = operatorProp.enumValueIndex;
            ConditionOperatorType operatorEnumValue = (ConditionOperatorType)Enum.GetValues(typeof(ConditionOperatorType)).GetValue(operatorEnumValueIndex);

            switch (operatorEnumValue)
            {
            case ConditionOperatorType.Equal:
                return("=");

            case ConditionOperatorType.NotEqual:
                return("!=");

            case ConditionOperatorType.LessThan:
                return("<");

            case ConditionOperatorType.MoreThan:
                return(">");

            case ConditionOperatorType.LessThanEqual:
                return("<=");

            case ConditionOperatorType.MoreThanEqual:
                return(">=");

            default:
                return("(?)");
            }
        }
        /// <summary>
        /// Convert a <see cref="StringSearch"/> <see cref="ConditionOperatorType"/> to a <see cref="TypeSearch"/> <see cref="RangeOperator"/>
        /// </summary>
        /// <param name="conditionType"></param>
        /// <returns></returns>
        private RangeOperator ConvertConditionTypeToRangeType(ConditionOperatorType conditionType)
        {
            var op = RangeOperator.Between;

            switch (conditionType)
            {
            case ConditionOperatorType.Between:
                op = RangeOperator.Between;
                break;

            case ConditionOperatorType.NotBetween:
                op = RangeOperator.NotBetween;
                break;
            }
            return(op);
        }
        /// <summary>
        /// Convert a <see cref="StringSearch"/> <see cref="ConditionOperatorType"/> to a <see cref="TypeSearch"/> <see cref="SingleOperator"/>
        /// </summary>
        /// <param name="conditionType"></param>
        /// <returns></returns>
        private SingleOperator ConvertConditionTypeToSingleType(ConditionOperatorType conditionType)
        {
            var op = SingleOperator.Equals;

            switch (conditionType)
            {
            case ConditionOperatorType.Like:
                op = SingleOperator.Like;
                break;

            case ConditionOperatorType.NotLike:
                op = SingleOperator.NotLike;
                break;

            case ConditionOperatorType.StartsWith:
                op = SingleOperator.StartsWith;
                break;

            case ConditionOperatorType.DoesNotStartWith:
                op = SingleOperator.DoesNotStartWith;
                break;

            case ConditionOperatorType.EndsWith:
                op = SingleOperator.EndsWith;
                break;

            case ConditionOperatorType.DoesNotEndWith:
                op = SingleOperator.DoesNotEndWith;
                break;

            case ConditionOperatorType.Equals:
                op = SingleOperator.Equals;
                break;

            case ConditionOperatorType.NotEquals:
                op = SingleOperator.NotEquals;
                break;

            case ConditionOperatorType.LessThan:
                op = SingleOperator.LessThan;
                break;

            case ConditionOperatorType.LessThanOrEqualTo:
                op = SingleOperator.LessThanOrEqualTo;
                break;

            case ConditionOperatorType.GreaterThan:
                op = SingleOperator.GreaterThan;
                break;

            case ConditionOperatorType.GreaterThanOrEqualTo:
                op = SingleOperator.GreaterThanOrEqualTo;
                break;

            case ConditionOperatorType.IsNull:
                op = SingleOperator.IsNull;
                break;

            case ConditionOperatorType.IsNotNull:
                op = SingleOperator.IsNotNull;
                break;
            }
            return(op);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="Criterion"/> class with the specified name, operator, and value
 /// </summary>
 /// <param name="name"></param>
 /// <param name="operator"></param>
 /// <param name="value"></param>
 public Criterion(string name, ConditionOperatorType @operator, object value)
 {
     this.Name     = name;
     this.Operator = @operator;
     this.Value    = value;
 }
Exemple #6
0
 public SequencingRuleTypeRuleConditionsRuleCondition()
 {
     operatorField = ConditionOperatorType.noOp;
 }
Exemple #7
0
 public RollupRuleTypeRollupConditionsRollupCondition(ConditionOperatorType @operator, RollupRuleConditionType condition)
 {
     this.@operator = @operator;
     this.condition = condition;
 }
Exemple #8
0
 public RollupRuleTypeRollupConditionsRollupCondition()
 {
     operatorField = ConditionOperatorType.noOp;
 }
Exemple #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OperatorToken"/> class with the supplied operator
 /// </summary>
 /// <param name="operator"></param>
 public OperatorToken(ConditionOperatorType @operator)
 {
     Operator = @operator;
 }