Mercurial > pub > ImplabNet
annotate Implab/Diagnostics/Extensions.cs @ 92:4c0e5ef99986 v2
rewritten tracing
| author | cin |
|---|---|
| date | Wed, 22 Oct 2014 18:37:56 +0400 |
| parents | |
| children | a43745f81f10 |
| rev | line source |
|---|---|
| 92 | 1 namespace Implab.Diagnostics { |
| 2 public static class Extensions { | |
| 3 public static IPromise<T> EndLogicalOperation<T>(this IPromise<T> promise) { | |
| 4 Safe.ArgumentNotNull(promise, "promise"); | |
| 5 var op = TraceContext.Instance.DetachLogicalOperation(); | |
| 6 | |
| 7 return promise.Anyway(() => { | |
| 8 TraceContext.Instance.EnterLogicalOperation(op,true); | |
| 9 TraceLog.EndLogicalOperation(); | |
| 10 TraceContext.Instance.Leave(); | |
| 11 }); | |
| 12 } | |
| 13 } | |
| 14 } | |
| 15 |
