Esempio n. 1
0
    // Token: 0x060009A6 RID: 2470 RVA: 0x00037DDC File Offset: 0x00035FDC
    private void method_34(JsonWriter jsonWriter_0, IDynamicMetaObjectProvider idynamicMetaObjectProvider_0, JsonDynamicContract jsonDynamicContract_0, JsonProperty jsonProperty_0, JsonContainerContract jsonContainerContract_0, JsonProperty jsonProperty_1)
    {
        this.method_17(jsonWriter_0, jsonDynamicContract_0, idynamicMetaObjectProvider_0);
        this.list_0.Add(idynamicMetaObjectProvider_0);
        this.method_21(jsonWriter_0, idynamicMetaObjectProvider_0, jsonDynamicContract_0, jsonProperty_0, jsonContainerContract_0, jsonProperty_1);
        int top = jsonWriter_0.Top;

        for (int i = 0; i < jsonDynamicContract_0.Properties.Count; i++)
        {
            JsonProperty jsonProperty = jsonDynamicContract_0.Properties[i];
            if (jsonProperty.HasMemberAttribute)
            {
                try
                {
                    JsonContract jsonContract_;
                    object       object_;
                    if (this.method_20(jsonWriter_0, idynamicMetaObjectProvider_0, jsonDynamicContract_0, jsonProperty_0, jsonProperty, out jsonContract_, out object_))
                    {
                        jsonProperty.method_3(jsonWriter_0);
                        this.method_9(jsonWriter_0, object_, jsonContract_, jsonProperty, jsonDynamicContract_0, jsonProperty_0);
                    }
                }
                catch (Exception exception_)
                {
                    if (!base.method_4(idynamicMetaObjectProvider_0, jsonDynamicContract_0, jsonProperty.PropertyName, null, jsonWriter_0.xEuXaafal7(), exception_))
                    {
                        throw;
                    }
                    this.method_39(jsonWriter_0, top);
                }
            }
        }
        foreach (string text in idynamicMetaObjectProvider_0.smethod_0())
        {
            object object_2;
            if (jsonDynamicContract_0.TryGetMember(idynamicMetaObjectProvider_0, text, out object_2))
            {
                try
                {
                    JsonContract jsonContract_2 = this.method_7(object_2);
                    if (this.method_35(object_2))
                    {
                        if (this.method_13(jsonWriter_0, object_2, null, jsonContract_2, jsonDynamicContract_0, jsonProperty_0))
                        {
                            string name = (jsonDynamicContract_0.PropertyNameResolver != null) ? jsonDynamicContract_0.PropertyNameResolver(text) : text;
                            jsonWriter_0.WritePropertyName(name);
                            this.method_9(jsonWriter_0, object_2, jsonContract_2, null, jsonDynamicContract_0, jsonProperty_0);
                        }
                    }
                }
                catch (Exception exception_2)
                {
                    if (!base.method_4(idynamicMetaObjectProvider_0, jsonDynamicContract_0, text, null, jsonWriter_0.xEuXaafal7(), exception_2))
                    {
                        throw;
                    }
                    this.method_39(jsonWriter_0, top);
                }
            }
        }
        jsonWriter_0.WriteEndObject();
        this.list_0.RemoveAt(this.list_0.Count - 1);
        this.method_18(jsonWriter_0, jsonDynamicContract_0, idynamicMetaObjectProvider_0);
    }
Esempio n. 2
0
        private void method_31(JsonWriter jsonWriter_0, IDynamicMetaObjectProvider idynamicMetaObjectProvider_0, JsonDynamicContract jsonDynamicContract_0, JsonProperty jsonProperty_0, JsonContainerContract jsonContainerContract_0, JsonProperty jsonProperty_1)
        {
            this.method_15(jsonWriter_0, jsonDynamicContract_0, idynamicMetaObjectProvider_0);
            this.list_0.Add(idynamicMetaObjectProvider_0);
            this.method_19(jsonWriter_0, idynamicMetaObjectProvider_0, jsonDynamicContract_0, jsonProperty_0, jsonContainerContract_0, jsonProperty_1);
            int top  = jsonWriter_0.Top;
            int num2 = 0;

            while (true)
            {
                if (num2 >= jsonDynamicContract_0.Properties.Count)
                {
                    break;
                }
                JsonProperty property = jsonDynamicContract_0.Properties[num2];
                if (property.HasMemberAttribute)
                {
                    try
                    {
                        object       obj2;
                        JsonContract contract;
                        if (this.method_18(jsonWriter_0, idynamicMetaObjectProvider_0, jsonDynamicContract_0, jsonProperty_0, property, out contract, out obj2))
                        {
                            property.method_2(jsonWriter_0);
                            this.method_7(jsonWriter_0, obj2, contract, property, jsonDynamicContract_0, jsonProperty_0);
                        }
                    }
                    catch (Exception exception)
                    {
                        if (!base.method_2(idynamicMetaObjectProvider_0, jsonDynamicContract_0, property.PropertyName, null, jsonWriter_0.String_0, exception))
                        {
                            throw;
                        }
                        this.method_36(jsonWriter_0, top);
                    }
                }
                num2++;
            }
            foreach (string str in idynamicMetaObjectProvider_0.smethod_0())
            {
                object obj3;
                if (jsonDynamicContract_0.method_5(idynamicMetaObjectProvider_0, str, out obj3))
                {
                    try
                    {
                        JsonContract contract2 = this.method_5(obj3);
                        if (this.method_32(obj3) && this.method_11(jsonWriter_0, obj3, null, contract2, jsonDynamicContract_0, jsonProperty_0))
                        {
                            string name = (jsonDynamicContract_0.PropertyNameResolver != null) ? jsonDynamicContract_0.PropertyNameResolver(str) : str;
                            jsonWriter_0.WritePropertyName(name);
                            this.method_7(jsonWriter_0, obj3, contract2, null, jsonDynamicContract_0, jsonProperty_0);
                        }
                    }
                    catch (Exception exception2)
                    {
                        if (!base.method_2(idynamicMetaObjectProvider_0, jsonDynamicContract_0, str, null, jsonWriter_0.String_0, exception2))
                        {
                            throw;
                        }
                        this.method_36(jsonWriter_0, top);
                    }
                }
            }
            jsonWriter_0.WriteEndObject();
            this.list_0.RemoveAt(this.list_0.Count - 1);
            this.method_16(jsonWriter_0, jsonDynamicContract_0, idynamicMetaObjectProvider_0);
        }