Ejemplo n.º 1
0
        public async ICovariantAwaitable <CommandDispatchResult> HandleAsync(DispatchCommand message)
        {
            if (message == null)
            {
                throw new ArgumentNullException(nameof(message));
            }

            Console.WriteLine($"Received 'DispatchCommand' for command type '{message.CommandType.FullName}' with command '{message.Command}'.");

            var answer = new CommandDispatchResult(await _commandDispatcher.DispatchAsync(message.CommandType, message.Command));

            return(answer);
        }