Ejemplo n.º 1
0
 internal static void Exit(string callId, TraceMethod caller)
 {
     if (ValidateSettings(Asmx, TraceEventType.Information))
     {
         TraceEvent(TraceEventType.Information, Res.GetString("TraceCallExit", new object[] { callId, caller }));
     }
 }
Ejemplo n.º 2
0
 internal static Exception ExceptionThrow(TraceEventType eventType, TraceMethod method, Exception e)
 {
     if (ValidateSettings(Asmx, eventType))
     {
         TraceEvent(eventType, Res.GetString("TraceExceptionThrown", new object[] { method.ToString(), e.GetType(), e.Message }));
         StackTrace(eventType, e);
     }
     return(e);
 }
        internal static void Exit(string callId, TraceMethod caller)
        {
            if (!ValidateSettings(Asmx, TraceEventType.Information))
            {
                return;
            }

            TraceEvent(TraceEventType.Information, Res.GetString(Res.TraceCallExit, callId, caller));
        }
        internal static Exception ExceptionCatch(TraceEventType eventType, object target, string method, Exception e)
        {
            if (!ValidateSettings(Asmx, eventType))
            {
                return(e);
            }

            TraceEvent(eventType, Res.GetString(Res.TraceExceptionCought, TraceMethod.MethodId(target, method), e.GetType(), e.Message));
            StackTrace(eventType, e);

            return(e);
        }
        internal static Exception ExceptionIgnore(TraceEventType eventType, TraceMethod method, Exception e)
        {
            if (!ValidateSettings(Asmx, eventType))
            {
                return(e);
            }

            TraceEvent(eventType, Res.GetString(Res.TraceExceptionIgnored, method, e.GetType(), e.Message));
            StackTrace(eventType, e);

            return(e);
        }
Ejemplo n.º 6
0
 internal static void Enter(string callId, TraceMethod caller, TraceMethod callDetails, List <string> details)
 {
     if (ValidateSettings(Asmx, TraceEventType.Information))
     {
         string str = (callDetails == null) ? Res.GetString("TraceCallEnter", new object[] { callId, caller }) : Res.GetString("TraceCallEnterDetails", new object[] { callId, caller, callDetails });
         if ((details != null) && (details.Count > 0))
         {
             StringBuilder builder = new StringBuilder(str);
             foreach (string str2 in details)
             {
                 builder.Append(Environment.NewLine);
                 builder.Append("    ");
                 builder.Append(str2);
             }
             str = builder.ToString();
         }
         TraceEvent(TraceEventType.Information, str);
     }
 }
 internal static void Enter(string callId, TraceMethod caller, TraceMethod callDetails, List<string> details)
 {
     if (ValidateSettings(Asmx, TraceEventType.Information))
     {
         string str = (callDetails == null) ? Res.GetString("TraceCallEnter", new object[] { callId, caller }) : Res.GetString("TraceCallEnterDetails", new object[] { callId, caller, callDetails });
         if ((details != null) && (details.Count > 0))
         {
             StringBuilder builder = new StringBuilder(str);
             foreach (string str2 in details)
             {
                 builder.Append(Environment.NewLine);
                 builder.Append("    ");
                 builder.Append(str2);
             }
             str = builder.ToString();
         }
         TraceEvent(TraceEventType.Information, str);
     }
 }
        internal static void Enter(string callId, TraceMethod caller, TraceMethod callDetails, List <string> details)
        {
            if (!ValidateSettings(Asmx, TraceEventType.Information))
            {
                return;
            }
            string trace = callDetails == null?Res.GetString(Res.TraceCallEnter, callId, caller) : Res.GetString(Res.TraceCallEnterDetails, callId, caller, callDetails);

            if (details != null && details.Count > 0)
            {
                StringBuilder sb = new StringBuilder(trace);
                foreach (string detail in details)
                {
                    sb.Append(Environment.NewLine);
                    sb.Append("    ");
                    sb.Append(detail);
                }
                trace = sb.ToString();
            }
            TraceEvent(TraceEventType.Information, trace);
        }
Ejemplo n.º 9
0
 internal void RunExtensions(SoapExtension[] extensions, bool throwOnException)
 {
   if (extensions == null)
     return;
   TraceMethod traceMethod1;
   if (!Tracing.On)
     traceMethod1 = (TraceMethod) null;
   else
     traceMethod1 = new TraceMethod((object) this, "RunExtensions", new object[2]
     {
       (object) extensions,
       (object) (bool) (throwOnException ? 1 : 0)
     });
   TraceMethod traceMethod2 = traceMethod1;
   if ((this.stage & (SoapMessageStage) 12) != (SoapMessageStage) 0)
   {
     for (int index = 0; index < extensions.Length; ++index)
     {
       if (Tracing.On)
         Tracing.Enter("SoapExtension", traceMethod2, new TraceMethod((object) extensions[index], "ProcessMessage", new object[1]
         {
           (object) this.stage
         }));
       extensions[index].ProcessMessage(this);
       if (Tracing.On)
         Tracing.Exit("SoapExtension", traceMethod2);
       if (this.Exception != null)
       {
         if (throwOnException)
           throw this.Exception;
         if (Tracing.On)
           Tracing.ExceptionIgnore(TraceEventType.Warning, traceMethod2, (Exception) this.Exception);
       }
     }
   }
   else
   {
     for (int index = extensions.Length - 1; index >= 0; --index)
     {
       if (Tracing.On)
         Tracing.Enter("SoapExtension", traceMethod2, new TraceMethod((object) extensions[index], "ProcessMessage", new object[1]
         {
           (object) this.stage
         }));
       extensions[index].ProcessMessage(this);
       if (Tracing.On)
         Tracing.Exit("SoapExtension", traceMethod2);
       if (this.Exception != null)
       {
         if (throwOnException)
           throw this.Exception;
         if (Tracing.On)
           Tracing.ExceptionIgnore(TraceEventType.Warning, traceMethod2, (Exception) this.Exception);
       }
     }
   }
 }
 internal static void Enter(string callId, TraceMethod caller, List <string> details)
 {
     Enter(callId, caller, null, details);
 }
 internal static void Enter(string callId, TraceMethod caller, TraceMethod callDetails)
 {
     Enter(callId, caller, callDetails, null);
 }
Ejemplo n.º 12
0
        internal static Exception ExceptionIgnore(TraceEventType eventType, TraceMethod method, Exception e) {
            if (!ValidateSettings(Asmx, eventType))
                return e;

            TraceEvent(eventType, Res.GetString(Res.TraceExceptionIgnored, method, e.GetType(), e.Message));
            StackTrace(eventType, e);

            return e;
        }
 internal static void Enter(string callId, TraceMethod caller)
 {
     Enter(callId, caller, null, null);
 }
 internal static Exception ExceptionCatch(TraceMethod method, Exception e)
 {
     return(ExceptionCatch(TraceEventType.Error, method, e));
 }
Ejemplo n.º 15
0
 internal static void Enter(string callId, TraceMethod caller, TraceMethod callDetails, List<string> details) {
     if (!ValidateSettings(Asmx, TraceEventType.Information))
         return;
     string trace = callDetails == null ? Res.GetString(Res.TraceCallEnter, callId, caller) : Res.GetString(Res.TraceCallEnterDetails, callId, caller, callDetails);
     if (details != null && details.Count > 0) {
         StringBuilder sb = new StringBuilder(trace);
         foreach (string detail in details) {
             sb.Append(Environment.NewLine);
             sb.Append("    ");
             sb.Append(detail);
         }
         trace = sb.ToString();
     }
     TraceEvent(TraceEventType.Information, trace);
 }
 internal static Exception ExceptionCatch(TraceMethod method, Exception e)
 {
     return ExceptionCatch(TraceEventType.Error, method, e);
 }
 internal static Exception ExceptionCatch(TraceEventType eventType, TraceMethod method, Exception e)
 {
     if (ValidateSettings(Asmx, eventType))
     {
         TraceEvent(eventType, Res.GetString("TraceExceptionCought", new object[] { method, e.GetType(), e.Message }));
         StackTrace(eventType, e);
     }
     return e;
 }
Ejemplo n.º 18
0
        internal static void Exit(string callId, TraceMethod caller) {
            if (!ValidateSettings(Asmx, TraceEventType.Information))
                return;

            TraceEvent(TraceEventType.Information, Res.GetString(Res.TraceCallExit, callId, caller));
        }
 internal static void Enter(string callId, TraceMethod caller, TraceMethod callDetails)
 {
     Enter(callId, caller, callDetails, null);
 }
 internal static void Enter(string callId, TraceMethod caller, List<string> details)
 {
     Enter(callId, caller, null, details);
 }
 internal static void Enter(string callId, TraceMethod caller)
 {
     Enter(callId, caller, null, null);
 }
 internal static void Exit(string callId, TraceMethod caller)
 {
     if (ValidateSettings(Asmx, TraceEventType.Information))
     {
         TraceEvent(TraceEventType.Information, Res.GetString("TraceCallExit", new object[] { callId, caller }));
     }
 }