Esempio n. 1
0
    // Token: 0x0600094B RID: 2379 RVA: 0x00033128 File Offset: 0x00031328
    protected bool method_4(object object_0, JsonContract jsonContract_0, object object_1, IJsonLineInfo ijsonLineInfo_0, string string_0, Exception exception_0)
    {
        ErrorContext errorContext = this.method_2(object_0, object_1, string_0, exception_0);

        if (this.itraceWriter_0 != null && this.itraceWriter_0.LevelFilter >= TraceLevel.Error && !errorContext.method_0())
        {
            errorContext.method_1(true);
            string text = (base.GetType() == typeof(Class119)) ? "Error serializing" : "Error deserializing";
            if (jsonContract_0 != null)
            {
                text = text + " " + jsonContract_0.UnderlyingType;
            }
            text = text + ". " + exception_0.Message;
            if (!(exception_0 is JsonException))
            {
                text = Struct0.smethod_1(ijsonLineInfo_0, string_0, text);
            }
            this.itraceWriter_0.Trace(TraceLevel.Error, text, exception_0);
        }
        if (jsonContract_0 != null && object_0 != null)
        {
            jsonContract_0.method_4(object_0, this.jsonSerializer_0.Context, errorContext);
        }
        if (!errorContext.Handled)
        {
            this.jsonSerializer_0.method_6(new ErrorEventArgs(object_0, errorContext));
        }
        return(errorContext.Handled);
    }