コード例 #1
0
    // Token: 0x0600098C RID: 2444 RVA: 0x00036C00 File Offset: 0x00034E00
    private void method_9(JsonWriter jsonWriter_0, object object_0, JsonContract jsonContract_0, JsonProperty jsonProperty_0, JsonContainerContract jsonContainerContract_0, JsonProperty jsonProperty_1)
    {
        if (object_0 == null)
        {
            jsonWriter_0.WriteNull();
            return;
        }
        JsonConverter jsonConverter;

        if (jsonProperty_0 != null)
        {
            if ((jsonConverter = jsonProperty_0.Converter) != null)
            {
                goto IL_65;
            }
        }
        if (jsonProperty_1 != null)
        {
            if ((jsonConverter = jsonProperty_1.ItemConverter) != null)
            {
                goto IL_65;
            }
        }
        if (jsonContainerContract_0 != null)
        {
            if ((jsonConverter = jsonContainerContract_0.ItemConverter) != null)
            {
                goto IL_65;
            }
        }
        if ((jsonConverter = jsonContract_0.Converter) == null)
        {
            jsonConverter = (this.jsonSerializer_0.method_5(jsonContract_0.UnderlyingType) ?? jsonContract_0.InternalConverter);
        }
IL_65:
        JsonConverter jsonConverter2 = jsonConverter;

        if (jsonConverter2 != null && jsonConverter2.CanWrite)
        {
            this.method_28(jsonWriter_0, jsonConverter2, object_0, jsonContract_0, jsonContainerContract_0, jsonProperty_1);
            return;
        }
        switch (jsonContract_0.enum8_0)
        {
        case (Enum8)1:
            this.method_19(jsonWriter_0, object_0, (JsonObjectContract)jsonContract_0, jsonProperty_0, jsonContainerContract_0, jsonProperty_1);
            return;

        case (Enum8)2:
        {
            JsonArrayContract jsonArrayContract = (JsonArrayContract)jsonContract_0;
            if (!jsonArrayContract.IsMultidimensionalArray)
            {
                this.method_29(jsonWriter_0, (IEnumerable)object_0, jsonArrayContract, jsonProperty_0, jsonContainerContract_0, jsonProperty_1);
                return;
            }
            this.method_30(jsonWriter_0, (Array)object_0, jsonArrayContract, jsonProperty_0, jsonContainerContract_0, jsonProperty_1);
            return;
        }

        case (Enum8)3:
            this.method_8(jsonWriter_0, object_0, (JsonPrimitiveContract)jsonContract_0, jsonProperty_0, jsonContainerContract_0, jsonProperty_1);
            return;

        case (Enum8)4:
            this.method_16(jsonWriter_0, object_0, (JsonStringContract)jsonContract_0);
            return;

        case (Enum8)5:
        {
            JsonDictionaryContract jsonDictionaryContract = (JsonDictionaryContract)jsonContract_0;
            IDictionary            dictionary;
            IDictionary            idictionary_;
            if ((dictionary = (object_0 as IDictionary)) == null)
            {
                IDictionary dictionary2 = jsonDictionaryContract.method_12(object_0);
                idictionary_ = dictionary2;
            }
            else
            {
                idictionary_ = dictionary;
            }
            this.method_37(jsonWriter_0, idictionary_, jsonDictionaryContract, jsonProperty_0, jsonContainerContract_0, jsonProperty_1);
            return;
        }

        case (Enum8)6:
            this.method_34(jsonWriter_0, (IDynamicMetaObjectProvider)object_0, (JsonDynamicContract)jsonContract_0, jsonProperty_0, jsonContainerContract_0, jsonProperty_1);
            return;

        case (Enum8)7:
            this.method_33(jsonWriter_0, (ISerializable)object_0, (JsonISerializableContract)jsonContract_0, jsonProperty_0, jsonContainerContract_0, jsonProperty_1);
            return;

        case (Enum8)8:
            ((JToken)object_0).WriteTo(jsonWriter_0, this.jsonSerializer_0.Converters.ToArray <JsonConverter>());
            return;

        default:
            return;
        }
    }