Exemplo n.º 1
0
 protected static void ReturnVoidMethodDump(bool breakExecution = true)
 {
     if (IsMethodDumpTraceActive)
     {
         Tracer.IndentEnd();
         Tracer.Line(Tracer.MethodHeader(stackFrameDepth: 1) + "[returns]");
         if (breakExecution)
         {
             Tracer.TraceBreak();
         }
     }
 }
Exemplo n.º 2
0
 protected static T ReturnMethodDump <T>(T rv, bool breakExecution = true)
 {
     if (IsMethodDumpTraceActive)
     {
         Tracer.IndentEnd();
         Tracer.Line(Tracer.MethodHeader(stackFrameDepth: 1) + "[returns] " + Tracer.Dump(rv));
         if (breakExecution)
         {
             Tracer.TraceBreak();
         }
     }
     return(rv);
 }
Exemplo n.º 3
0
 void BeforeAction(string flag, int stackFrameDepth)
 {
     lock (this)
     {
         _stopwatch.Stop();
         var start = _stopwatch.Elapsed;
         _current.Suspend(start);
         _stack.Push(_current);
         var position = Tracer.MethodHeader(stackFrameDepth: stackFrameDepth + 1) + flag;
         if (!_profileItems.TryGetValue(position, out _current))
         {
             _current = new ProfileItem(position);
             _profileItems.Add(position, _current);
         }
         _current.Start(start);
         _stopwatch.Start();
     }
 }