diff Implab/Diagnostics/TraceContext.cs @ 46:9ce97b262a7a interactive logger

Слияние с default
author cin
date Thu, 17 Apr 2014 08:49:24 +0400
parents 7c2369f580b8
children d9d794b61bb9
line wrap: on
line diff
--- a/Implab/Diagnostics/TraceContext.cs	Thu Apr 17 03:05:53 2014 +0400
+++ b/Implab/Diagnostics/TraceContext.cs	Thu Apr 17 08:49:24 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));
         }