示例#1
0
        // Token: 0x06000F4D RID: 3917 RVA: 0x0004F090 File Offset: 0x0004D290
        private void pmethod_2779(Class_431 arg_0)
        {
            if (arg_0 == null)
            {
                return;
            }
            if (!this.pmethod_2789(arg_0, Class_463.String))
            {
                return;
            }
            this.cmethod_2764(arg_0);
            string text = this.field_0.prop_10.ToString();

            if (arg_0.prop_3 != null && text.Length > arg_0.prop_3)
            {
                this.pmethod_2759("String '{0}' exceeds maximum length of {1}.".FormatWith(CultureInfo.InvariantCulture, text, arg_0.prop_3), arg_0);
            }
            if (arg_0.prop_2 != null && text.Length < arg_0.prop_2)
            {
                this.pmethod_2759("String '{0}' is less than minimum length of {1}.".FormatWith(CultureInfo.InvariantCulture, text, arg_0.prop_2), arg_0);
            }
            if (arg_0.prop_11 != null)
            {
                foreach (string text2 in arg_0.prop_11)
                {
                    if (!Regex.IsMatch(text, text2))
                    {
                        this.pmethod_2759("String '{0}' does not match regex pattern '{1}'.".FormatWith(CultureInfo.InvariantCulture, text, text2), arg_0);
                    }
                }
            }
        }
示例#2
0
        // Token: 0x06000F49 RID: 3913 RVA: 0x0004EEBC File Offset: 0x0004D0BC
        private void vmethod_2775(Class_431 arg_0)
        {
            if (arg_0 == null)
            {
                return;
            }
            Dictionary <string, bool> dictionary = this.field_4.nprop_6;

            if (dictionary != null)
            {
                IEnumerable <KeyValuePair <string, bool> > source = dictionary;
                if (Class_381.field_10 == null)
                {
                    Class_381.field_10 = new Func <KeyValuePair <string, bool>, bool>(Class_381.dmethod_2796);
                }
                IEnumerable <KeyValuePair <string, bool> > source2 = source.Where(Class_381.field_10);
                if (Class_381.field_11 == null)
                {
                    Class_381.field_11 = new Func <KeyValuePair <string, bool>, string>(Class_381.kmethod_2797);
                }
                List <string> list = source2.Select(Class_381.field_11).ToList <string>();
                if (list.Count > 0)
                {
                    this.pmethod_2759("Required properties are missing from object: {0}.".FormatWith(CultureInfo.InvariantCulture, string.Join(", ", list.ToArray())), arg_0);
                }
            }
        }
示例#3
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);
                }
            }
        }
示例#4
0
 // Token: 0x06000F57 RID: 3927 RVA: 0x0004F8D8 File Offset: 0x0004DAD8
 private bool pmethod_2789(Class_431 arg_0, Class_463 arg_1)
 {
     if (!Class_462.gmethod_3823(new Class_463?(arg_0.prop_1), arg_1))
     {
         this.pmethod_2759("Invalid type. Expected {0} but got {1}.".FormatWith(CultureInfo.InvariantCulture, arg_0.prop_1, arg_1), arg_0);
         return(false);
     }
     return(true);
 }
示例#5
0
 // Token: 0x06000F4B RID: 3915 RVA: 0x0004F050 File Offset: 0x0004D250
 private void kmethod_2777(Class_431 arg_0)
 {
     if (arg_0 == null)
     {
         return;
     }
     if (!this.pmethod_2789(arg_0, Class_463.Null))
     {
         return;
     }
     this.cmethod_2764(arg_0);
 }
示例#6
0
 // Token: 0x06000F4C RID: 3916 RVA: 0x0004F06F File Offset: 0x0004D26F
 private void lmethod_2778(Class_431 arg_0)
 {
     if (arg_0 == null)
     {
         return;
     }
     if (!this.pmethod_2789(arg_0, Class_463.Boolean))
     {
         return;
     }
     this.cmethod_2764(arg_0);
 }
示例#7
0
        // Token: 0x06000F3E RID: 3902 RVA: 0x0004E5F0 File Offset: 0x0004C7F0
        private void cmethod_2764(Class_431 arg_0)
        {
            if (arg_0 == null)
            {
                return;
            }
            Class_463?class_ = this.vmethod_2765();

            if (class_ != null && Class_462.gmethod_3823(new Class_463?(arg_0.prop_22), class_.Value))
            {
                this.pmethod_2759("Type {0} is disallowed.".FormatWith(CultureInfo.InvariantCulture, class_), arg_0);
            }
        }
示例#8
0
        // Token: 0x06000F4A RID: 3914 RVA: 0x0004EF68 File Offset: 0x0004D168
        private void dmethod_2776(Class_431 arg_0)
        {
            if (arg_0 == null)
            {
                return;
            }
            int num = this.field_4.nprop_1;

            if (arg_0.prop_10 != null && num > arg_0.prop_10)
            {
                this.pmethod_2759("Array item count {0} exceeds maximum count of {1}.".FormatWith(CultureInfo.InvariantCulture, num, arg_0.prop_10), arg_0);
            }
            if (arg_0.prop_9 != null && num < arg_0.prop_9)
            {
                this.pmethod_2759("Array item count {0} is less than minimum count of {1}.".FormatWith(CultureInfo.InvariantCulture, num, arg_0.prop_9), arg_0);
            }
        }
示例#9
0
        // Token: 0x06000F53 RID: 3923 RVA: 0x0004F78C File Offset: 0x0004D98C
        private void vmethod_2785(Class_431 arg_0)
        {
            if (arg_0 == null)
            {
                return;
            }
            string text = Convert.ToString(this.field_0.prop_10, CultureInfo.InvariantCulture);

            if (this.field_4.nprop_6.ContainsKey(text))
            {
                this.field_4.nprop_6[text] = true;
            }
            if (!arg_0.prop_18 && !this.dmethod_2786(arg_0, text))
            {
                this.pmethod_2759("Property '{0}' has not been defined and the schema does not allow additional properties.".FormatWith(CultureInfo.InvariantCulture, text), arg_0);
            }
            this.field_4.nprop_0 = text;
        }
示例#10
0
 // Token: 0x06000F54 RID: 3924 RVA: 0x0004F81C File Offset: 0x0004DA1C
 private bool dmethod_2786(Class_431 arg_0, string str_0)
 {
     if (arg_0.prop_13 != null && arg_0.prop_13.ContainsKey(str_0))
     {
         return(true);
     }
     if (arg_0.prop_14 != null)
     {
         foreach (string pattern in arg_0.prop_14.Keys)
         {
             if (Regex.IsMatch(str_0, pattern))
             {
                 return(true);
             }
         }
         return(false);
     }
     return(false);
 }
示例#11
0
            // Token: 0x06000F6F RID: 3951 RVA: 0x0004FB0C File Offset: 0x0004DD0C
            private IEnumerable <string> nmethod_14(Class_431 arg_0)
            {
                if (arg_0 == null || arg_0.prop_13 == null)
                {
                    return(Enumerable.Empty <string>());
                }
                IEnumerable <KeyValuePair <string, Class_431> > source = arg_0.prop_13;

                if (Class_381.NClass_0.field_63 == null)
                {
                    Class_381.NClass_0.field_63 = new Func <KeyValuePair <string, Class_431>, bool>(Class_381.NClass_0.nmethod_18);
                }
                IEnumerable <KeyValuePair <string, Class_431> > source2 = source.Where(Class_381.NClass_0.field_63);

                if (Class_381.NClass_0.field_64 == null)
                {
                    Class_381.NClass_0.field_64 = new Func <KeyValuePair <string, Class_431>, string>(Class_381.NClass_0.nmethod_19);
                }
                return(source2.Select(Class_381.NClass_0.field_64));
            }
示例#12
0
 private static bool cmethod_2794(Class_431 arg_0)
 {
     return(arg_0.prop_20);
 }
示例#13
0
 // Token: 0x06000F56 RID: 3926 RVA: 0x0004F8C3 File Offset: 0x0004DAC3
 private bool lmethod_2788(Class_431 arg_0)
 {
     return(arg_0 == null || this.pmethod_2789(arg_0, Class_463.Object));
 }
示例#14
0
 // Token: 0x06000F55 RID: 3925 RVA: 0x0004F8B0 File Offset: 0x0004DAB0
 private bool kmethod_2787(Class_431 arg_0)
 {
     return(arg_0 == null || this.pmethod_2789(arg_0, Class_463.Array));
 }
示例#15
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);
                }
            }
        }
示例#16
0
 private static bool nmethod_17(Class_431 arg_0)
 {
     return(arg_0.prop_20);
 }
示例#17
0
 private static bool vmethod_2795(Class_431 arg_0)
 {
     return(arg_0.prop_21 != null);
 }
示例#18
0
        // Token: 0x06000F38 RID: 3896 RVA: 0x0004E500 File Offset: 0x0004C700
        private void pmethod_2759(string str_0, Class_431 arg_0)
        {
            string str_ = ((Class_353)this).lmethod_2368() ? (str_0 + " Line {0}, position {1}.".FormatWith(CultureInfo.InvariantCulture, ((Class_353)this).prop_0, ((Class_353)this).prop_1)) : str_0;

            this.smethod_2760(new Class_430(str_, null, this.prop_13, ((Class_353)this).prop_0, ((Class_353)this).prop_1));
        }
示例#19
0
        // Token: 0x06000F47 RID: 3911 RVA: 0x0004E7D0 File Offset: 0x0004C9D0
        private void gmethod_2773()
        {
            if (this.field_3 == null)
            {
                Class_432 class_ = new Class_432();
                this.field_3 = class_.tmethod_3502(this.field_2);
                if (!Class_486.IsStartToken(this.field_0.prop_9))
                {
                    this.vmethod_2755(new Class_381.NClass_0(Class_428.None, this.prop_7));
                }
            }
            switch (this.field_0.prop_9)
            {
            case Class_508.None:
                return;

            case Class_508.StartObject:
            {
                this.xmethod_2781();
                IList <Class_431> arg_ = this.prop_7.Where(new Func <Class_431, bool>(this.lmethod_2788)).ToList <Class_431>();
                this.vmethod_2755(new Class_381.NClass_0(Class_428.Object, arg_));
                this.cmethod_2774(this.prop_6);
                return;
            }

            case Class_508.StartArray:
            {
                this.xmethod_2781();
                IList <Class_431> arg_2 = this.prop_7.Where(new Func <Class_431, bool>(this.kmethod_2787)).ToList <Class_431>();
                this.vmethod_2755(new Class_381.NClass_0(Class_428.Array, arg_2));
                this.cmethod_2774(this.prop_6);
                return;
            }

            case Class_508.StartConstructor:
                this.xmethod_2781();
                this.vmethod_2755(new Class_381.NClass_0(Class_428.Constructor, null));
                this.cmethod_2774(this.prop_6);
                return;

            case Class_508.PropertyName:
                this.cmethod_2774(this.prop_6);
                using (IEnumerator <Class_431> enumerator = this.prop_6.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        Class_431 arg_3 = enumerator.Current;
                        this.vmethod_2785(arg_3);
                    }
                    return;
                }
                break;

            case Class_508.Comment:
                goto IL_3F9;

            case Class_508.Raw:
                break;

            case Class_508.Integer:
                this.xmethod_2781();
                this.cmethod_2774(this.prop_7);
                using (IEnumerator <Class_431> enumerator2 = this.prop_7.GetEnumerator())
                {
                    while (enumerator2.MoveNext())
                    {
                        Class_431 arg_4 = enumerator2.Current;
                        this.smethod_2780(arg_4);
                    }
                    return;
                }
                goto IL_1E8;

            case Class_508.Float:
                goto IL_1E8;

            case Class_508.String:
                goto IL_23A;

            case Class_508.Boolean:
                goto IL_28C;

            case Class_508.Null:
                goto IL_2DE;

            case Class_508.Undefined:
            case Class_508.Date:
            case Class_508.Bytes:
                this.cmethod_2774(this.prop_7);
                return;

            case Class_508.EndObject:
                goto IL_330;

            case Class_508.EndArray:
                this.cmethod_2774(this.prop_6);
                foreach (Class_431 arg_5 in this.prop_6)
                {
                    this.dmethod_2776(arg_5);
                }
                this.dmethod_2756();
                return;

            case Class_508.EndConstructor:
                this.cmethod_2774(this.prop_6);
                this.dmethod_2756();
                return;

            default:
                goto IL_3F9;
            }
            this.xmethod_2781();
            return;

IL_1E8:
            this.xmethod_2781();
            this.cmethod_2774(this.prop_7);
            using (IEnumerator <Class_431> enumerator4 = this.prop_7.GetEnumerator())
            {
                while (enumerator4.MoveNext())
                {
                    Class_431 arg_6 = enumerator4.Current;
                    this.tmethod_2782(arg_6);
                }
                return;
            }
IL_23A:
            this.xmethod_2781();
            this.cmethod_2774(this.prop_7);
            using (IEnumerator <Class_431> enumerator5 = this.prop_7.GetEnumerator())
            {
                while (enumerator5.MoveNext())
                {
                    Class_431 arg_7 = enumerator5.Current;
                    this.pmethod_2779(arg_7);
                }
                return;
            }
IL_28C:
            this.xmethod_2781();
            this.cmethod_2774(this.prop_7);
            using (IEnumerator <Class_431> enumerator6 = this.prop_7.GetEnumerator())
            {
                while (enumerator6.MoveNext())
                {
                    Class_431 arg_8 = enumerator6.Current;
                    this.lmethod_2778(arg_8);
                }
                return;
            }
IL_2DE:
            this.xmethod_2781();
            this.cmethod_2774(this.prop_7);
            using (IEnumerator <Class_431> enumerator7 = this.prop_7.GetEnumerator())
            {
                while (enumerator7.MoveNext())
                {
                    Class_431 arg_9 = enumerator7.Current;
                    this.kmethod_2777(arg_9);
                }
                return;
            }
IL_330:
            this.cmethod_2774(this.prop_6);
            foreach (Class_431 arg_10 in this.prop_6)
            {
                this.vmethod_2775(arg_10);
            }
            this.dmethod_2756();
            return;

IL_3F9:
            throw new ArgumentOutOfRangeException();
        }