Mercurial > pub > ImplabNet
diff Implab/Diagnostics/Extensions.cs @ 94:a43745f81f10 v2
minor fixes
author | cin |
---|---|
date | Thu, 23 Oct 2014 17:50:09 +0400 |
parents | 4c0e5ef99986 |
children | 1b7ebcc52e5a |
line wrap: on
line diff
--- a/Implab/Diagnostics/Extensions.cs Thu Oct 23 01:13:57 2014 +0400 +++ b/Implab/Diagnostics/Extensions.cs Thu Oct 23 17:50:09 2014 +0400 @@ -10,6 +10,17 @@ TraceContext.Instance.Leave(); }); } + + public static IPromise EndLogicalOperation(this IPromise promise) { + Safe.ArgumentNotNull(promise, "promise"); + var op = TraceContext.Instance.DetachLogicalOperation(); + + return promise.Anyway(() => { + TraceContext.Instance.EnterLogicalOperation(op,true); + TraceLog.EndLogicalOperation(); + TraceContext.Instance.Leave(); + }); + } } }