public override bool Evaluate(Operator op, NTVariable value)
        {
            Type rightVariableType = value.GetDataType();

            if (rightVariableType == typeof(bool))
            {
                bool rightValue = (bool)value.GetValue();
                return(InternalEvaluate(op, rightValue, true));
            }
            else
            {
                return(this.value);
            }
        }
Ejemplo n.º 2
0
        public override bool Evaluate(Operator op, NTVariable value)
        {
            Type rightVariableType = value.GetDataType();

            if (rightVariableType == typeof(float) || rightVariableType == typeof(int) || rightVariableType == typeof(double))
            {
                float rightValue = (float)value.GetValue();
                return(InternalEvaluate(op, rightValue, true));
            }
            else
            {
                return(this.value > 0);
            }
        }
        public override bool Evaluate(Operator op, NTVariable value)
        {
            Type rightVariableType = value.GetDataType();

            if (rightVariableType == typeof(string))
            {
                string rightValue = (string)value.GetValue();
                return(Evaluate(op, rightValue, true));
            }
            else
            {
                return(!string.IsNullOrEmpty(this.value));
            }
        }