/// <inheritdoc/>
        public async Task <IWorkflowInstanceResult> Send(TimeSpan?timeout = null)
        {
            var asyncReply = client.CreateWorkflowInstanceWithResultAsync(createWithResultRequest, deadline: timeout?.FromUtcNow());
            var response   = await asyncReply.ResponseAsync;

            return(new WorkflowInstanceResultResponse(response));
        }
        /// <inheritdoc/>
        public async Task <IWorkflowInstanceResult> Send(TimeSpan?timeout = null)
        {
            // this timeout will be used for the Gateway-Broker communication
            createWithResultRequest.RequestTimeout = (long)(timeout?.TotalMilliseconds ?? DefaultGatewayBrokerTimeoutMillisecond);

            // this is the timeout between client and gateway
            var clientDeadline = TimeSpan.FromMilliseconds(createWithResultRequest.RequestTimeout +
                                                           DefaultTimeoutAdditionMillisecond).FromUtcNow();

            var asyncReply = client.CreateWorkflowInstanceWithResultAsync(createWithResultRequest, deadline: clientDeadline);
            var response   = await asyncReply.ResponseAsync;

            return(new WorkflowInstanceResultResponse(response));
        }