コード例 #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);
    }
コード例 #2
0
        protected bool method_2(object object_0, JsonContract jsonContract_0, object object_1, IJsonLineInfo ijsonLineInfo_0, string string_0, Exception exception_0)
        {
            ErrorContext context = this.method_0(object_0, object_1, string_0, exception_0);

            if (((this.itraceWriter_0 != null) && (this.itraceWriter_0.LevelFilter >= TraceLevel.Error)) && !context.Boolean_0)
            {
                context.Boolean_0 = true;
                string str = this.bool_0 ? "Error serializing" : "Error deserializing";
                if (jsonContract_0 != null)
                {
                    str = str + " " + jsonContract_0.UnderlyingType;
                }
                str = str + ". " + exception_0.Message;
                if (!(exception_0 is JsonException))
                {
                    str = Struct25.smethod_2(ijsonLineInfo_0, string_0, str);
                }
                this.itraceWriter_0.Trace(TraceLevel.Error, str, exception_0);
            }
            if (jsonContract_0 != null)
            {
                jsonContract_0.method_4(object_0, this.jsonSerializer_0.StreamingContext_0, context);
            }
            if (!context.Handled)
            {
                this.jsonSerializer_0.method_3(new ErrorEventArgs(object_0, context));
            }
            return(context.Handled);
        }