public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
        {
            Interface9 interface2 = Class163.smethod_5 <Interface9>(value);
            Type       type       = (interface2.Object_0 != null) ? interface2.Object_0.GetType() : null;

            writer.WriteStartObject();
            writer.WritePropertyName("Key");
            writer.WriteValue(interface2.String_0);
            writer.WritePropertyName("Type");
            writer.WriteValue((type != null) ? type.FullName : null);
            writer.WritePropertyName("Value");
            if (type != null)
            {
                string str;
                if (Class137.smethod_0(interface2.Object_0, type, out str))
                {
                    writer.WriteValue(str);
                }
                else
                {
                    writer.WriteValue(interface2.Object_0);
                }
            }
            else
            {
                writer.WriteNull();
            }
            writer.WriteEndObject();
        }
Beispiel #2
0
    // Token: 0x06000B44 RID: 2884 RVA: 0x0003AC0C File Offset: 0x00038E0C
    public Class137 method_1(Class137 class137_1, JsonSchema jsonSchema_0)
    {
        string key;

        if (class137_1 != null)
        {
            if (class137_1.method_1().Contains(jsonSchema_0))
            {
                return(class137_1);
            }
            key = Class137.smethod_0(class137_1.method_1().Union(new JsonSchema[]
            {
                jsonSchema_0
            }));
        }
        else
        {
            key = Class137.smethod_0(new JsonSchema[]
            {
                jsonSchema_0
            });
        }
        if (this.class139_0.Contains(key))
        {
            return(this.class139_0[key]);
        }
        Class137 @class = (class137_1 != null) ? class137_1.method_9(jsonSchema_0) : new Class137(jsonSchema_0);

        this.class139_0.Add(@class);
        this.method_2(jsonSchema_0.Properties, @class.method_2());
        this.method_2(jsonSchema_0.PatternProperties, @class.method_3());
        if (jsonSchema_0.Items != null)
        {
            for (int i = 0; i < jsonSchema_0.Items.Count; i++)
            {
                this.method_4(@class, i, jsonSchema_0.Items[i]);
            }
        }
        if (jsonSchema_0.AdditionalItems != null)
        {
            this.method_6(@class, jsonSchema_0.AdditionalItems);
        }
        if (jsonSchema_0.AdditionalProperties != null)
        {
            this.method_5(@class, jsonSchema_0.AdditionalProperties);
        }
        if (jsonSchema_0.Extends != null)
        {
            foreach (JsonSchema jsonSchema_ in jsonSchema_0.Extends)
            {
                @class = this.method_1(@class, jsonSchema_);
            }
        }
        return(@class);
    }
Beispiel #3
0
 // Token: 0x06000B55 RID: 2901 RVA: 0x0003AFF8 File Offset: 0x000391F8
 public Class137(JsonSchema jsonSchema_0)
 {
     Class202.ofdixO4zTbIfy();
     base..ctor();
     this.readOnlyCollection_0 = new ReadOnlyCollection <JsonSchema>(new JsonSchema[]
     {
         jsonSchema_0
     });
     this.dictionary_0 = new Dictionary <string, Class137>();
     this.dictionary_1 = new Dictionary <string, Class137>();
     this.list_0       = new List <Class137>();
     this.string_0     = Class137.smethod_0(this.method_1());
 }
Beispiel #4
0
 // Token: 0x06000B56 RID: 2902 RVA: 0x0003B058 File Offset: 0x00039258
 private Class137(Class137 class137_2, JsonSchema jsonSchema_0)
 {
     Class202.ofdixO4zTbIfy();
     base..ctor();
     this.readOnlyCollection_0 = new ReadOnlyCollection <JsonSchema>(class137_2.method_1().Union(new JsonSchema[]
     {
         jsonSchema_0
     }).ToList <JsonSchema>());
     this.dictionary_0 = new Dictionary <string, Class137>(class137_2.method_2());
     this.dictionary_1 = new Dictionary <string, Class137>(class137_2.method_3());
     this.list_0       = new List <Class137>(class137_2.method_4());
     this.method_6(class137_2.method_5());
     this.method_8(class137_2.method_7());
     this.string_0 = Class137.smethod_0(this.method_1());
 }