示例#1
0
 public FuncWrapperDisposable(
     Action incrementAction,
     Action decrementAction,
     FuncWrapperId funcWrapperId
     )
 {
     _decrementAction = decrementAction;
     FuncWrapperId    = funcWrapperId;
     incrementAction();
     _wrapperNum = Interlocked.Increment(ref _nextFuncWrapperNum);
     EnterTime   = DateTime.UtcNow;
     _funcWrapperDb.TryAdd(_wrapperNum, this);
 }
 public FuncWrapperDisposable(
     Action incrementAction,
     Action decrementAction,
     FuncWrapperId funcWrapperId
     )
 {
     _decrementAction = decrementAction;
     FuncWrapperId = funcWrapperId;
     incrementAction();
     _wrapperNum = Interlocked.Increment(ref _nextFuncWrapperNum);
     EnterTime = DateTime.UtcNow;
     _funcWrapperDb.TryAdd(_wrapperNum, this);
 }