comparison Implab/Diagnostics/TraceContext.cs @ 76:c761fc982e1d v2

Refactoring of the IPromise<T> interface Added tests
author cin
date Wed, 10 Sep 2014 17:53:05 +0400
parents 790e8a997d30
children 4c0e5ef99986
comparison
equal deleted inserted replaced
75:4439140706d0 76:c761fc982e1d
213 213
214 public void BindLogicalOperationToPromise(IPromise promise) { 214 public void BindLogicalOperationToPromise(IPromise promise) {
215 Safe.ArgumentNotNull(promise, "promise"); 215 Safe.ArgumentNotNull(promise, "promise");
216 216
217 var ctx = DetachLogicalOperation(); 217 var ctx = DetachLogicalOperation();
218 promise.Finally(() => { 218 promise.Anyway(() => {
219 var old = _current; 219 var old = _current;
220 TraceContext.Attach(ctx); 220 TraceContext.Attach(ctx);
221 TraceContext.Current.EndLogicalOperation(); 221 TraceContext.Current.EndLogicalOperation();
222 _current = old; 222 _current = old;
223 }); 223 });