Extensions.cs
26 lines
| 956 B
| text/x-csharp
|
CSharpLexer
cin
|
r92 | namespace Implab.Diagnostics { | ||
public static class Extensions { | ||||
public static IPromise<T> EndLogicalOperation<T>(this IPromise<T> promise) { | ||||
Safe.ArgumentNotNull(promise, "promise"); | ||||
var op = TraceContext.Instance.DetachLogicalOperation(); | ||||
return promise.Anyway(() => { | ||||
TraceContext.Instance.EnterLogicalOperation(op,true); | ||||
TraceLog.EndLogicalOperation(); | ||||
TraceContext.Instance.Leave(); | ||||
}); | ||||
} | ||||
cin
|
r94 | |||
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(); | ||||
}); | ||||
} | ||||
cin
|
r92 | } | ||
} | ||||