Exemplo n.º 1
0
        // Token: 0x06000F50 RID: 3920 RVA: 0x0004F548 File Offset: 0x0004D748
        private void tmethod_2782(Class_431 arg_0)
        {
            if (arg_0 == null)
            {
                return;
            }
            if (!this.pmethod_2789(arg_0, Class_463.Float))
            {
                return;
            }
            this.cmethod_2764(arg_0);
            double num = Convert.ToDouble(this.field_0.prop_10, CultureInfo.InvariantCulture);

            if (arg_0.prop_6 != null)
            {
                double num2 = num;
                double?num3 = arg_0.prop_6;
                if (num2 > num3.GetValueOrDefault() && num3 != null)
                {
                    this.pmethod_2759("Float {0} exceeds maximum value of {1}.".FormatWith(CultureInfo.InvariantCulture, Class_416.ToString(num), arg_0.prop_6), arg_0);
                }
                if (arg_0.prop_8)
                {
                    double num4 = num;
                    double?num5 = arg_0.prop_6;
                    if (num4 == num5.GetValueOrDefault() && num5 != null)
                    {
                        this.pmethod_2759("Float {0} equals maximum value of {1} and exclusive maximum is true.".FormatWith(CultureInfo.InvariantCulture, Class_416.ToString(num), arg_0.prop_6), arg_0);
                    }
                }
            }
            if (arg_0.prop_5 != null)
            {
                double num6 = num;
                double?num7 = arg_0.prop_5;
                if (num6 < num7.GetValueOrDefault() && num7 != null)
                {
                    this.pmethod_2759("Float {0} is less than minimum value of {1}.".FormatWith(CultureInfo.InvariantCulture, Class_416.ToString(num), arg_0.prop_5), arg_0);
                }
                if (arg_0.prop_7)
                {
                    double num8 = num;
                    double?num9 = arg_0.prop_5;
                    if (num8 == num9.GetValueOrDefault() && num9 != null)
                    {
                        this.pmethod_2759("Float {0} equals minimum value of {1} and exclusive minimum is true.".FormatWith(CultureInfo.InvariantCulture, Class_416.ToString(num), arg_0.prop_5), arg_0);
                    }
                }
            }
            if (arg_0.prop_4 != null)
            {
                double double_ = Class_381.gmethod_2783(num, arg_0.prop_4.Value);
                if (!Class_381.cmethod_2784(double_))
                {
                    this.pmethod_2759("Float {0} is not evenly divisible by {1}.".FormatWith(CultureInfo.InvariantCulture, Class_416.ToString(num), arg_0.prop_4), arg_0);
                }
            }
        }
Exemplo n.º 2
0
        // Token: 0x06000F4E RID: 3918 RVA: 0x0004F20C File Offset: 0x0004D40C
        private void smethod_2780(Class_431 arg_0)
        {
            if (arg_0 == null)
            {
                return;
            }
            if (!this.pmethod_2789(arg_0, Class_463.Integer))
            {
                return;
            }
            this.cmethod_2764(arg_0);
            object obj = this.field_0.prop_10;

            if (arg_0.prop_6 != null)
            {
                if (Class_362.xmethod_2591(Class_428.Integer, obj, arg_0.prop_6) > 0)
                {
                    this.pmethod_2759("Integer {0} exceeds maximum value of {1}.".FormatWith(CultureInfo.InvariantCulture, obj, arg_0.prop_6), arg_0);
                }
                if (arg_0.prop_8 && Class_362.xmethod_2591(Class_428.Integer, obj, arg_0.prop_6) == 0)
                {
                    this.pmethod_2759("Integer {0} equals maximum value of {1} and exclusive maximum is true.".FormatWith(CultureInfo.InvariantCulture, obj, arg_0.prop_6), arg_0);
                }
            }
            if (arg_0.prop_5 != null)
            {
                if (Class_362.xmethod_2591(Class_428.Integer, obj, arg_0.prop_5) < 0)
                {
                    this.pmethod_2759("Integer {0} is less than minimum value of {1}.".FormatWith(CultureInfo.InvariantCulture, obj, arg_0.prop_5), arg_0);
                }
                if (arg_0.prop_7 && Class_362.xmethod_2591(Class_428.Integer, obj, arg_0.prop_5) == 0)
                {
                    this.pmethod_2759("Integer {0} equals minimum value of {1} and exclusive minimum is true.".FormatWith(CultureInfo.InvariantCulture, obj, arg_0.prop_5), arg_0);
                }
            }
            if (arg_0.prop_4 != null)
            {
                bool flag2;
                if (obj is BigInteger)
                {
                    BigInteger bigInteger = (BigInteger)obj;
                    bool       flag       = !Math.Abs(arg_0.prop_4.Value - Math.Truncate(arg_0.prop_4.Value)).Equals(0.0);
                    if (flag)
                    {
                        flag2 = (bigInteger != 0L);
                    }
                    else
                    {
                        flag2 = (bigInteger % new BigInteger(arg_0.prop_4.Value) != 0L);
                    }
                }
                else
                {
                    flag2 = !Class_381.cmethod_2784((double)Convert.ToInt64(obj, CultureInfo.InvariantCulture) % arg_0.prop_4.Value);
                }
                if (flag2)
                {
                    this.pmethod_2759("Integer {0} is not evenly divisible by {1}.".FormatWith(CultureInfo.InvariantCulture, Class_416.ToString(obj), arg_0.prop_4), arg_0);
                }
            }
        }