示例#1
0
        public override object Math2Value(CQ_Content env, char code, object left, CQ_Content.Value right, out CQType returntype)
        {
            bool   math2ValueSuccess = false;
            object value             = NumericTypeUtils.Math2Value <ulong>(code, left, right, out returntype, out math2ValueSuccess);

            if (math2ValueSuccess)
            {
                return(value);
            }

            return(base.Math2Value(env, code, left, right, out returntype));
        }
示例#2
0
        public override bool MathLogic(CQ_Content env, logictoken code, object left, CQ_Content.Value right)
        {
            bool mathLogicSuccess = false;
            bool value            = NumericTypeUtils.MathLogic <ulong>(code, left, right, out mathLogicSuccess);

            if (mathLogicSuccess)
            {
                return(value);
            }

            return(base.MathLogic(env, code, left, right));
        }
示例#3
0
        public override object ConvertTo(CQ_Content env, object src, CQType targetType)
        {
            bool   convertSuccess  = false;
            object convertedObject = NumericTypeUtils.TryConvertTo <ulong>(src, targetType, out convertSuccess);

            if (convertSuccess)
            {
                return(convertedObject);
            }

            return(base.ConvertTo(env, src, targetType));
        }