##// END OF EJS Templates
sync
sync

File last commit:

r94:a43745f81f10 v2
r108:f3bdb7ba59b9 v2
Show More
Extensions.cs
26 lines | 956 B | text/x-csharp | CSharpLexer
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();
});
}
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();
});
}
}
}