/// <summary> /// Execute a command. /// </summary> /// <param name="request"> /// An <see cref="ExecuteCommand"/> message indicating the command to execute. /// </param> /// <returns> /// The command result. /// </returns> async Task <CommandResult> Execute(ExecuteCommand request) { Log.Debug("Executing '{0}' command '{1}'.", request.RequestMessage.OperationName, request.CorrelationId ); InFlightRequest inFlightRequest = CreateRequest(request.RequestMessage, replyTo: Sender); Response responseMessage = await request.Command(_client, inFlightRequest.Cancellation); return(new CommandResult(responseMessage)); }