Esempio n. 1
0
    // Token: 0x060009A9 RID: 2473 RVA: 0x00038134 File Offset: 0x00036334
    private void method_37(JsonWriter jsonWriter_0, IDictionary idictionary_0, JsonDictionaryContract jsonDictionaryContract_0, JsonProperty jsonProperty_0, JsonContainerContract jsonContainerContract_0, JsonProperty jsonProperty_1)
    {
        Interface1 @interface;
        object     obj = ((@interface = (idictionary_0 as Interface1)) != null) ? @interface.UnderlyingDictionary : idictionary_0;

        this.method_17(jsonWriter_0, jsonDictionaryContract_0, obj);
        this.list_0.Add(obj);
        this.method_21(jsonWriter_0, obj, jsonDictionaryContract_0, jsonProperty_0, jsonContainerContract_0, jsonProperty_1);
        if (jsonDictionaryContract_0.EwhtYgWttB() == null)
        {
            jsonDictionaryContract_0.method_5(this.jsonSerializer_0.icontractResolver_0.ResolveContract(jsonDictionaryContract_0.DictionaryValueType ?? typeof(object)));
        }
        if (jsonDictionaryContract_0.method_7() == null)
        {
            jsonDictionaryContract_0.method_8(this.jsonSerializer_0.icontractResolver_0.ResolveContract(jsonDictionaryContract_0.DictionaryKeyType ?? typeof(object)));
        }
        int top = jsonWriter_0.Top;

        using (IDictionaryEnumerator enumerator = idictionary_0.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                DictionaryEntry entry = enumerator.Entry;
                bool            escape;
                string          text = this.method_38(jsonWriter_0, entry.Key, jsonDictionaryContract_0.method_7(), out escape);
                text = ((jsonDictionaryContract_0.DictionaryKeyResolver != null) ? jsonDictionaryContract_0.DictionaryKeyResolver(text) : text);
                try
                {
                    object       value         = entry.Value;
                    JsonContract jsonContract_ = jsonDictionaryContract_0.method_6() ?? this.method_7(value);
                    if (this.method_11(value, null, jsonContract_, jsonDictionaryContract_0, jsonProperty_0))
                    {
                        jsonWriter_0.WritePropertyName(text, escape);
                        this.method_14(jsonWriter_0, value);
                    }
                    else if (this.method_13(jsonWriter_0, value, null, jsonContract_, jsonDictionaryContract_0, jsonProperty_0))
                    {
                        jsonWriter_0.WritePropertyName(text, escape);
                        this.method_9(jsonWriter_0, value, jsonContract_, null, jsonDictionaryContract_0, jsonProperty_0);
                    }
                }
                catch (Exception exception_)
                {
                    if (!base.method_4(obj, jsonDictionaryContract_0, text, null, jsonWriter_0.xEuXaafal7(), exception_))
                    {
                        throw;
                    }
                    this.method_39(jsonWriter_0, top);
                }
            }
        }
        jsonWriter_0.WriteEndObject();
        this.list_0.RemoveAt(this.list_0.Count - 1);
        this.method_18(jsonWriter_0, jsonDictionaryContract_0, obj);
    }