public async Task ProcessMessageAsync(GatewayPayload payload) { var message = JsonConvert.DeserializeObject <GatewayMessage>(payload.EventData.ToString()); if (_commandValidator.IsCommand(message)) { var command = new Command(message); await _commandDispatcher.DispatchAsync(command); } }