public override FutureResponse AsyncRequest(ICommand command) { var commandId = GetNextCommandId(); command.CommandId = commandId; command.ResponseRequired = true; var future = new FutureResponse(); var priorError = _error; if (priorError == null) { _requestMap.AddOrUpdate(commandId, future, (_, _) => future); } if (priorError != null) { var brError = new BrokerError { Message = priorError.Message }; var response = new ExceptionResponse { Exception = brError }; future.Response = response; throw priorError; } Next.Oneway(command); return(future); }
public FutureResponse AsyncRequest(Command command) { FutureResponse response = new FutureResponse(); // Delegate to the Request method, it doesn't block. response.Response = this.RequestAsync(command).ConfigureAwait(false).GetAwaiter().GetResult(); return(response); }
public FutureResponse AsyncRequest(Command command) { FutureResponse response = new FutureResponse(); // Delegate to the Request method, it doesn't block. response.Response = this.Request(command); return(response); }
public FutureResponse AsyncRequest(Command command) { FutureResponse response = new FutureResponse(); // Delegate to the Request method, it doesn't block. response.Response = this.Request(command); return response; }
public FutureResponseConfigurator(FutureResponse <TRequest, TInput, TResponse> response) { _response = response; }