Exemplo n.º 1
0
 // Token: 0x06000CB5 RID: 3253 RVA: 0x00045944 File Offset: 0x00043B44
 public virtual IEnumerable <Class_361> dmethod_2266(IEnumerable <Class_361> arg_0, bool bool_0)
 {
     foreach (Class_361 class_ in arg_0)
     {
         Class_423 class_2 = class_ as Class_423;
         if (class_2 != null)
         {
             foreach (string text in this.prop_0)
             {
                 Class_361 class_3 = class_2.kmethod_3307(text);
                 if (class_3 != null)
                 {
                     yield return(class_3);
                 }
                 if (bool_0)
                 {
                     throw new Class_318("Property '{0}' does not exist on JObject.".FormatWith(CultureInfo.InvariantCulture, text));
                 }
             }
         }
         else if (bool_0)
         {
             string               format           = "Properties {0} not valid on {1}.";
             IFormatProvider      invariantCulture = CultureInfo.InvariantCulture;
             string               separator        = ", ";
             IEnumerable <string> source           = this.prop_0;
             if (Class_334.field_1 == null)
             {
                 Class_334.field_1 = new Func <string, string>(Class_334.kmethod_2267);
             }
             throw new Class_318(format.FormatWith(invariantCulture, string.Join(separator, source.Select(Class_334.field_1).ToArray <string>()), class_.GetType().Name));
         }
     }
     yield break;
 }
Exemplo n.º 2
0
        // Token: 0x06000A21 RID: 2593 RVA: 0x0003D38C File Offset: 0x0003B58C
        public virtual object vmethod_1775(Class_285 arg_0, Type arg_1, object obje_0, Class_418 arg_2)
        {
            if (arg_0.prop_9 == Class_508.Null)
            {
                return(null);
            }
            Class_361 class_  = Class_423.pmethod_3309(arg_0);
            Class_262 class_2 = new Class_262(this.field_0);
            Class_285 class_3 = class_.lmethod_2558();

            class_3.prop_14 = arg_0.prop_14;
            class_3.prop_7  = arg_0.prop_7;
            class_3.prop_5  = arg_0.prop_5;
            class_3.prop_4  = arg_0.prop_4;
            class_3.prop_6  = arg_0.prop_6;
            class_3.prop_8  = arg_0.prop_8;
            class_3.prop_2  = arg_0.prop_2;
            arg_2.vmethod_3165(class_3, class_2);
            return(class_2);
        }
Exemplo n.º 3
0
 // Token: 0x06000CA7 RID: 3239 RVA: 0x000455A8 File Offset: 0x000437A8
 public virtual IEnumerable <Class_361> gmethod_2263(IEnumerable <Class_361> arg_0, bool bool_0)
 {
     foreach (Class_361 class_ in arg_0)
     {
         Class_423 class_2 = class_ as Class_423;
         if (class_2 != null)
         {
             if (this.prop_0 != null)
             {
                 Class_361 class_3 = class_2.kmethod_3307(this.prop_0);
                 if (class_3 != null)
                 {
                     yield return(class_3);
                 }
                 else if (bool_0)
                 {
                     throw new Class_318("Property '{0}' does not exist on JObject.".FormatWith(CultureInfo.InvariantCulture, this.prop_0));
                 }
             }
             else
             {
                 using (IEnumerator <KeyValuePair <string, Class_361> > enumerator2 = class_2.smethod_3330())
                 {
                     while (enumerator2.MoveNext())
                     {
                         KeyValuePair <string, Class_361> keyValuePair  = enumerator2.Current;
                         KeyValuePair <string, Class_361> keyValuePair2 = keyValuePair;
                         yield return(keyValuePair2.Value);
                     }
                 }
             }
         }
         else if (bool_0)
         {
             throw new Class_318("Property '{0}' not valid on {1}.".FormatWith(CultureInfo.InvariantCulture, this.prop_0 ?? "*", class_.GetType().Name));
         }
     }
     yield break;
 }
Exemplo n.º 4
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());
        }
Exemplo n.º 5
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;
                    }
                }
            }
        }