コード例 #1
0
        public ResponseAwaiter <TResponse> Register()
        {
            var awaiter = new ResponseAwaiter <TResponse>();

            this._responseAwaiters.TryAdd(awaiter.CorrelationId, awaiter);

            return(awaiter);
        }
コード例 #2
0
 public void Remove(ResponseAwaiter <TResponse> awaiter)
 {
     this._responseAwaiters.TryRemove(awaiter.CorrelationId, out ResponseAwaiter <TResponse> _);
 }