Mercurial > pub > ImplabNet
diff Implab/Diagnostics/TraceContext.cs @ 43:7c2369f580b8
improved tracing, TextListenerBase can be bound to logical operation scope.
author | cin |
---|---|
date | Wed, 16 Apr 2014 10:12:56 +0400 |
parents | 2fc0fbe7d58b |
children | d9d794b61bb9 |
line wrap: on
line diff
--- a/Implab/Diagnostics/TraceContext.cs Wed Apr 16 00:33:09 2014 +0400 +++ b/Implab/Diagnostics/TraceContext.cs Wed Apr 16 10:12:56 2014 +0400 @@ -92,6 +92,7 @@ try { action(); } finally { + _current.EndAllOperations(); _current = old; } } @@ -156,6 +157,14 @@ } } + /// <summary> + /// Заврешает все начатые в этом контексте операции + /// </summary> + public void EndAllOperations() { + while (m_bound != m_currentOperation) + EndLogicalOperation(); + } + void LogEvent(TraceEventType type, string format, params object[] args) { LogChannel<TraceEvent>.Default.LogEvent(this, TraceEvent.Create(type, format, args)); }