##// END OF EJS Templates
added enumerable interface to MTQueue
added enumerable interface to MTQueue

File last commit:

r94:a43745f81f10 v2
r97:b11c7e9d93bc 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();
});
}
}
}