Example #1
0
        // Token: 0x060014C9 RID: 5321 RVA: 0x00060494 File Offset: 0x0005E694
        private Class_463?xmethod_3801(Class_361 arg_0)
        {
            Class_428 class_ = arg_0.prop_3;

            if (class_ == Class_428.Array)
            {
                Class_463?class_2 = new Class_463?(Class_463.None);
                foreach (Class_361 class_3 in ((IEnumerable <Class_361>)arg_0))
                {
                    if (class_3.prop_3 != Class_428.String)
                    {
                        throw Class_318.xmethod_2221(class_3, class_3.prop_7, "Exception JSON schema type string token, got {0}.".FormatWith(CultureInfo.InvariantCulture, arg_0.prop_3));
                    }
                    class_2 |= Class_460.tmethod_3802(Class_361.lmethod_2508(class_3));
                }
                return(class_2);
            }
            if (class_ != Class_428.String)
            {
                throw Class_318.xmethod_2221(arg_0, arg_0.prop_7, "Expected array or JSON schema type string token, got {0}.".FormatWith(CultureInfo.InvariantCulture, arg_0.prop_3));
            }
            return(new Class_463?(Class_460.tmethod_3802(Class_361.lmethod_2508(arg_0))));
        }
Example #2
0
        // Token: 0x060014C1 RID: 5313 RVA: 0x0005FA88 File Offset: 0x0005DC88
        private Class_459 gmethod_3793(Class_361 arg_0)
        {
            Class_423 class_ = arg_0 as Class_423;

            if (class_ == null)
            {
                throw Class_318.xmethod_2221(arg_0, arg_0.prop_7, "Expected object while parsing schema object, got {0}.".FormatWith(CultureInfo.InvariantCulture, arg_0.prop_3));
            }
            Class_361 arg_;

            if (class_.xmethod_3321("$ref", out arg_))
            {
                return(new Class_459
                {
                    prop_35 = Class_361.lmethod_2508(arg_)
                });
            }
            string text = arg_0.prop_7.Replace(".", "/").Replace("[", "/").Replace("]", string.Empty);

            if (!string.IsNullOrEmpty(text))
            {
                text = "/" + text;
            }
            text = "#" + text;
            Class_459 result;

            if (this.field_2.TryGetValue(text, out result))
            {
                return(result);
            }
            this.kmethod_3787(new Class_459
            {
                prop_33 = text
            });
            this.cmethod_3794(class_);
            return(this.lmethod_3788());
        }
Example #3
0
        // Token: 0x060014C2 RID: 5314 RVA: 0x0005FB80 File Offset: 0x0005DD80
        private void cmethod_3794(Class_423 arg_0)
        {
            using (IEnumerator <KeyValuePair <string, Class_361> > enumerator = arg_0.smethod_3330())
            {
                while (enumerator.MoveNext())
                {
                    KeyValuePair <string, Class_361> keyValuePair = enumerator.Current;
                    string key;
                    switch (key = keyValuePair.Key)
                    {
                    case "type":
                        this.prop_0.prop_7 = this.xmethod_3801(keyValuePair.Value);
                        break;

                    case "id":
                        this.prop_0.prop_0 = Class_361.lmethod_2508(keyValuePair.Value);
                        break;

                    case "title":
                        this.prop_0.prop_1 = Class_361.lmethod_2508(keyValuePair.Value);
                        break;

                    case "description":
                        this.prop_0.prop_6 = Class_361.lmethod_2508(keyValuePair.Value);
                        break;

                    case "properties":
                        this.prop_0.prop_23 = this.pmethod_3799(keyValuePair.Value);
                        break;

                    case "items":
                        this.smethod_3800(keyValuePair.Value);
                        break;

                    case "additionalProperties":
                        this.kmethod_3797(keyValuePair.Value);
                        break;

                    case "additionalItems":
                        this.lmethod_3798(keyValuePair.Value);
                        break;

                    case "patternProperties":
                        this.prop_0.prop_25 = this.pmethod_3799(keyValuePair.Value);
                        break;

                    case "required":
                        this.prop_0.prop_2 = new bool?(Class_361.smethod_2480(keyValuePair.Value));
                        break;

                    case "requires":
                        this.prop_0.prop_27 = Class_361.lmethod_2508(keyValuePair.Value);
                        break;

                    case "minimum":
                        this.prop_0.prop_12 = new double?(Class_361.dmethod_2506(keyValuePair.Value));
                        break;

                    case "maximum":
                        this.prop_0.prop_13 = new double?(Class_361.dmethod_2506(keyValuePair.Value));
                        break;

                    case "exclusiveMinimum":
                        this.prop_0.prop_14 = new bool?(Class_361.smethod_2480(keyValuePair.Value));
                        break;

                    case "exclusiveMaximum":
                        this.prop_0.prop_15 = new bool?(Class_361.smethod_2480(keyValuePair.Value));
                        break;

                    case "maxLength":
                        this.prop_0.prop_10 = new int?(Class_361.pmethod_2489(keyValuePair.Value));
                        break;

                    case "minLength":
                        this.prop_0.prop_9 = new int?(Class_361.pmethod_2489(keyValuePair.Value));
                        break;

                    case "maxItems":
                        this.prop_0.prop_17 = new int?(Class_361.pmethod_2489(keyValuePair.Value));
                        break;

                    case "minItems":
                        this.prop_0.prop_16 = new int?(Class_361.pmethod_2489(keyValuePair.Value));
                        break;

                    case "divisibleBy":
                        this.prop_0.prop_11 = new double?(Class_361.dmethod_2506(keyValuePair.Value));
                        break;

                    case "disallow":
                        this.prop_0.prop_29 = this.xmethod_3801(keyValuePair.Value);
                        break;

                    case "default":
                        this.prop_0.prop_30 = keyValuePair.Value.smethod_2580();
                        break;

                    case "hidden":
                        this.prop_0.prop_4 = new bool?(Class_361.smethod_2480(keyValuePair.Value));
                        break;

                    case "readonly":
                        this.prop_0.prop_3 = new bool?(Class_361.smethod_2480(keyValuePair.Value));
                        break;

                    case "format":
                        this.prop_0.prop_32 = Class_361.lmethod_2508(keyValuePair.Value);
                        break;

                    case "pattern":
                        this.prop_0.prop_8 = Class_361.lmethod_2508(keyValuePair.Value);
                        break;

                    case "enum":
                        this.dmethod_3796(keyValuePair.Value);
                        break;

                    case "extends":
                        this.vmethod_3795(keyValuePair.Value);
                        break;

                    case "uniqueItems":
                        this.prop_0.prop_22 = Class_361.smethod_2480(keyValuePair.Value);
                        break;
                    }
                }
            }
        }