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); } }
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); }
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); } }
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); }