##// END OF EJS Templates
minor fixes
minor fixes

File last commit:

r119:2573b562e328 v2
r132:5fb2bbffdece v2
Show More
Extensions.cs
43 lines | 1.6 KiB | text/x-csharp | CSharpLexer
cin
Promises rewritten, added improved version of AsyncQueue
r119 using System;
namespace Implab.Diagnostics {
cin
rewritten tracing
r92 public static class Extensions {
public static IPromise<T> EndLogicalOperation<T>(this IPromise<T> promise) {
Safe.ArgumentNotNull(promise, "promise");
var op = TraceContext.Instance.DetachLogicalOperation();
cin
Promises rewritten, added improved version of AsyncQueue
r119 return promise.On(
x => {
cin
minor fixes
r109 TraceContext.Instance.EnterLogicalOperation(op,true);
TraceLog.TraceInformation("promise = {0}", x);
TraceLog.EndLogicalOperation();
TraceContext.Instance.Leave();
},
err =>{
TraceContext.Instance.EnterLogicalOperation(op,true);
TraceLog.TraceError("promise died {0}", err);
TraceLog.EndLogicalOperation();
TraceContext.Instance.Leave();
},
() => {
TraceContext.Instance.EnterLogicalOperation(op,true);
TraceLog.TraceInformation("promise cancelled");
TraceLog.EndLogicalOperation();
TraceContext.Instance.Leave();
}
);
cin
rewritten tracing
r92 }
cin
minor fixes
r94
public static IPromise EndLogicalOperation(this IPromise promise) {
Safe.ArgumentNotNull(promise, "promise");
var op = TraceContext.Instance.DetachLogicalOperation();
cin
Promises rewritten, added improved version of AsyncQueue
r119 return promise.On(() => {
cin
minor fixes
r94 TraceContext.Instance.EnterLogicalOperation(op,true);
TraceLog.EndLogicalOperation();
TraceContext.Instance.Leave();
cin
Promises rewritten, added improved version of AsyncQueue
r119 }, PromiseEventType.All);
cin
minor fixes
r94 }
cin
rewritten tracing
r92 }
}