Пример #1
0
 public long TraceStartScope(string scope, params object[] parameters)
 {
     if (IsEnabled)
     {
         TraceEvent(TraceEventType.Start, WellKnownTraceCategory.TraceStartScope, InstrumentationUtility.SystemEventId.StartScope, InstrumentationUtility.Resources.FormatStringTraceScopeStart, scope, InstrumentationUtility.GetParameterList(parameters));
         return(this.highResTimer.TickCount);
     }
     else
     {
         return(0);
     }
 }
Пример #2
0
        public Guid TraceIn(params object[] parameters)
        {
            Guid callToken = Guid.NewGuid();

            if (IsEnabled)
            {
                TraceEvent(TraceEventType.Verbose, WellKnownTraceCategory.TraceIn, InstrumentationUtility.SystemEventId.MethodEntry, InstrumentationUtility.Resources.FormatStringTraceIn, InstrumentationUtility.GetFullMethodName(InstrumentationUtility.GetCallingMethod()), InstrumentationUtility.GetParameterList(parameters), callToken);
            }

            return(callToken);
        }
Пример #3
0
 public void TraceOut(Guid callToken, params object[] outParameters)
 {
     if (IsEnabled)
     {
         TraceEvent(TraceEventType.Verbose, WellKnownTraceCategory.TraceOut, InstrumentationUtility.SystemEventId.MethodExit, InstrumentationUtility.Resources.FormatStringTraceOut, InstrumentationUtility.GetFullMethodName(InstrumentationUtility.GetCallingMethod()), outParameters != null & outParameters.Length > 0 ? InstrumentationUtility.GetParameterList(outParameters) : InstrumentationUtility.Resources.NoReturnValue, callToken);
     }
 }
Пример #4
0
 public long TraceStartScope(string scope, params object[] parameters)
 {
     TraceEvent(TraceEventType.Start, WellKnownTraceCategory.TraceStartScope, InstrumentationUtility.SystemEventId.StartScope, InstrumentationUtility.Resources.FormatStringTraceScopeStart, scope, InstrumentationUtility.GetParameterList(parameters));
     return(HighResolutionTimer.CurrentTickCount);
 }