コード例 #1
0
 public void Handle(AckTimeout message)
 {
     if (Interlocked.Read(ref _state) == PendingAck)
     {
         if (_tcs.TrySetException(new CommandNotHandledException(" timed out waiting for a handler to start. Make sure a command handler is subscribed", _command)))
         {
             if (Log.LogLevel >= LogLevel.Error)
             {
                 Log.Error(_command.GetType().Name + " command not handled (no handler)");
             }
             _cancelAction();
         }
     }
 }
コード例 #2
0
 public void Handle(AckTimeout message)
 {
     _pendingCommands.TryGetValue(message.CommandId, out var tracker);
     tracker?.Handle(message);
 }